Skip to content

Commit 9815853

Browse files
committedApr 21, 2024
Use 'go install' instead of deprecated 'go get'
1 parent de0492e commit 9815853

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed
 

‎README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ The watch command requires the `entr` and `tput` commands be installed. The for
206206

207207
#### modd-watch
208208

209-
The [modd-watch](modules/modd-watch) module lets you define "watch rules": file patterns to watch for, combined with commands to run those when files change. Running `dk watch` (or `script/watch` if you create a link for it) will run [modd](https://github.com/cortesi/modd) to watch the files and run commands. (If modd isn't installed, the `watch` command will try to install it to the project `.deps` directory using `go get`.)
209+
The [modd-watch](modules/modd-watch) module lets you define "watch rules": file patterns to watch for, combined with commands to run those when files change. Running `dk watch` (or `script/watch` if you create a link for it) will run [modd](https://github.com/cortesi/modd) to watch the files and run commands. (If modd isn't installed, the `watch` command will try to install it to the project `.deps` directory using `go install`.)
210210

211211
The way you add rules is by calling the `watch` or `watch+` functions from your `.dkrc`. Each of these functions accepts zero or more glob patterns (optionally negated with a leading `!`), followed by `--` and a command to run. If no globs are specified, the command will run once, at the beginning of the watch. (You can also add global exclusion globs with `unwatch`.) Some examples:
212212

@@ -242,7 +242,7 @@ Finally, note that if your `.dkrc` file is changed during a watch run, the `dk w
242242

243243
#### reflex-watch
244244

245-
The [reflex-watch](modules/reflex-watch) module is almost identical to modd-watch in function, but using [reflex](https://github.com/cespare/reflex) to watch files and run commands. (If reflex isn't installed, the `watch` command will try to install it to the project `.deps` directory using `go get`.)
245+
The [reflex-watch](modules/reflex-watch) module is almost identical to modd-watch in function, but using [reflex](https://github.com/cespare/reflex) to watch files and run commands. (If reflex isn't installed, the `watch` command will try to install it to the project `.deps` directory using `go install`.)
246246

247247
The key differences are:
248248

@@ -291,7 +291,7 @@ dk use: golang
291291
golang 1.11.x # use latest-available golang 1.11
292292
```
293293

294-
And then use `go get` or other go commands as needed. Binaries will be built in `.deps/bin`, and the default `GOROOT` is `.deps/go` (unless you override these settings in `.envrc`).
294+
And then use `go install` or other go commands as needed. Binaries will be built in `.deps/bin`, and the default `GOROOT` is `.deps/go` (unless you override these settings in `.envrc`).
295295

296296
The `dk use: golang` command gives your `.dkrc` access to the following functions:
297297

‎dk.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ github() {
177177

178178
### go
179179

180-
Some utilities need to be built using `go get`, but go itself may not be present on the target system. We provide a wrapper that requests its installation, for use in commands like `require tool go get github.com/something/tool`.
180+
Some utilities need to be built using `go install`, but go itself may not be present on the target system. We provide a wrapper that requests its installation, for use in commands like `require tool go install github.com/something/tool`.
181181

182182
```shell
183183
go() { require-any go; unset -f go; command go "$@"; }

‎modules/modd-watch

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ dk use: tty
33

44
dk.watch() {
55
require-any modd dk use: golang
6-
require-any modd go get github.com/cortesi/modd/cmd/modd # Need modd for this
6+
require-any modd go install github.com/cortesi/modd/cmd/modd@0.8.1 # Need modd for this
77
require-any tput # for pager.watch
88

99
# Trap SIGUSR1 to restart the watch with new configuration

‎modules/reflex-watch

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
dk.watch() {
33
require-any reflex dk use: golang
4-
require-any reflex go get github.com/bashup/reflex # Need reflex for this
4+
require-any reflex go install github.com/bashup/reflex@bashup # Need reflex for this
55
require-any tput # for pager.watch
66

77
# Trap SIGUSR1 to restart the watch with new configuration

0 commit comments

Comments
 (0)
Please sign in to comment.