8000
Skip to content
Discussion options

You must be logged in to vote

There isn’t a subcommand in gok to undo replace directives.

But, you can use the go tool’s go mod edit subcommand:

% grep replace go.mod
// replace tailscale.com => /home/michael/go/src/github.com/tailscale/tailscale
replace github.com/stapelberg/scan2drive => /home/michael/go/src/github.com/stapelberg/scan2drive
replace github.com/gokrazy/gokrazy => /home/michael/go/src/github.com/gokrazy/gokrazy

% go mod edit -dropreplace=github.com/gokrazy/gokrazy 

% grep replace go.mod                                
// replace tailscale.com => /home/michael/go/src/github.com/tailscale/tailscale
replace github.com/stapelberg/scan2drive => /home/michael/go/src/github.com/stapelberg/scan2drive

(Or ju…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@fischman
Comment options

Answer selected by fischman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
0