Home

dotnix @3f29d4dc8195fe478ccc52fdfff74cc0cf53f77e - refs - log -
-
https://git.jolheiser.com/dotnix.git
My nix dotfiles
dotnix / home / nogui / nushell / autoload / go-update.nu
- raw -
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
module go-update {
  # Update to the latest go toolchain
  export def --env "go update" [] {
    let ver = http get https://go.dev/dl/?mode=json | where stable == true | first | get version
    print $"Old: (^go version)"
    ^go env -w GOTOOLCHAIN=$"($ver)+auto"
    print $"New: (^go version)"
  }
}
use go-update *