collinvandyck / gpterm

terminal client for openai's GPT completion APIs
MIT License
25 stars 6 forks source link

minimum go version problem #2

Closed su55y closed 1 year ago

su55y commented 1 year ago

Because of this time.TimeOnly const, the minimum Go version for the build must be 1.20 (commit, release note). This can be solved by hardcoding "15:04:05" to local const or just as arg, so I achieved a successful build on 1.18.1, or simply change the minimum version to 1.20.

collinvandyck commented 1 year ago

Ah, thank you for bringing this up. Will take a look soon.

collinvandyck commented 1 year ago

Fixed in https://github.com/collinvandyck/gpterm/commit/a6a8bcee4555521ebc21004dacd83508b26188f0

Verification:

❯ docker run -it --rm -v $(pwd):/proj -w /proj golang:1.18 make install
go install ./cmd/gpterm
go: downloading github.com/spf13/cobra v1.6.1
go: downloading github.com/sashabaranov/go-openai v1.5.8-0.20230401160622-b542086cbb22
go: downloading github.com/golang-migrate/migrate/v4 v4.15.2
go: downloading github.com/charmbracelet/bubbles v0.15.0
go: downloading github.com/charmbracelet/bubbletea v0.23.2
go: downloading github.com/charmbracelet/lipgloss v0.7.1
go: downloading github.com/mattn/go-sqlite3 v1.14.16
go: downloading github.com/google/go-github/v39 v39.2.0
go: downloading github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79
go: downloading golang.org/x/oauth2 v0.6.0
go: downloading github.com/spf13/pflag v1.0.5
go: downloading github.com/atotto/clipboard v0.1.4
go: downloading github.com/mattn/go-runewidth v0.0.14
go: downloading github.com/hashicorp/go-multierror v1.1.1
go: downloading golang.org/x/exp v0.0.0-20220428152302-39d4317da171
go: downloading github.com/muesli/reflow v0.3.0
go: downloading github.com/muesli/termenv v0.15.1
go: downloading github.com/containerd/console v1.0.3
go: downloading github.com/mattn/go-isatty v0.0.17
go: downloading github.com/mattn/go-localereader v0.0.1
go: downloading github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b
go: downloading github.com/muesli/cancelreader v0.2.2
go: downloading golang.org/x/sync v0.1.0
go: downloading golang.org/x/term v0.6.0
go: downloading go.uber.org/atomic v1.9.0
go: downloading github.com/alecthomas/chroma v0.10.0
go: downloading github.com/yuin/goldmark v1.5.4
go: downloading github.com/rivo/uniseg v0.2.0
go: downloading github.com/hashicorp/errwrap v1.1.0
go: downloading github.com/google/go-querystring v1.1.0
go: downloading golang.org/x/crypto v0.7.0
go: downloading golang.org/x/sys v0.6.0
go: downloading github.com/aymanbagabas/go-osc52/v2 v2.0.1
go: downloading github.com/lucasb-eyer/go-colorful v1.2.0
go: downloading github.com/dlclark/regexp2 v1.4.0