Skip to content

Commit

Permalink
fix(gomod): add toolchain directive (#516)
Browse files Browse the repository at this point in the history
This should ensure that the Go version specified by the manifest is the same version as the toolchain used.
  • Loading branch information
malept committed Jun 21, 2024
1 parent ca47910 commit d2ec06b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

go 1.21

toolchain go1.22.0

require (
github.com/getoutreach/gobox v1.90.2
github.com/getoutreach/stencil-golang/pkg v0.0.0-20230811193316-312178c3fbc3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

go 1.19

toolchain go1.22.0

require (
github.com/getoutreach/gobox v1.90.2
github.com/getoutreach/stencil-golang/pkg v0.0.0-20230811193316-312178c3fbc3
Expand Down
2 changes: 2 additions & 0 deletions templates/go.mod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ go 1.17
go {{ stencil.Arg "go.stanza" }}
{{- end }}

toolchain go{{ stencil.ApplyTemplate "goVersion" | trim }}

require (
{{- range $d := (stencil.ApplyTemplate "dependencies" | fromYaml).go }}
{{ $d.name }} {{ $d.version }}
Expand Down

0 comments on commit d2ec06b

Please sign in to comment.