Skip to content

Possible Add-on For README.md #1

Description

@TotallyNotAHaxxer

I notice that some people may come across errors like this one.

# github.com/TwiN/go-color
../../go/pkg/mod/github.com/!twi!n/go-color@v1.4.0/auto.go:21:32: undefined: any
../../go/pkg/mod/github.com/!twi!n/go-color@v1.4.0/color.go:61:31: undefined: any
../../go/pkg/mod/github.com/!twi!n/go-color@v1.4.0/color.go:81:26: undefined: any
../../go/pkg/mod/github.com/!twi!n/go-color@v1.4.0/color.go:90:27: undefined: any
../../go/pkg/mod/github.com/!twi!n/go-color@v1.4.0/color.go:99:15: undefined: any
../../go/pkg/mod/github.com/!twi!n/go-color@v1.4.0/color.go:108:20: undefined: any
../../go/pkg/mod/github.com/!twi!n/go-color@v1.4.0/color.go:117:16: undefined: any
../../go/pkg/mod/github.com/!twi!n/go-color@v1.4.0/color.go:126:14: undefined: any
../../go/pkg/mod/github.com/!twi!n/go-color@v1.4.0/color.go:135:16: undefined: any
../../go/pkg/mod/github.com/!twi!n/go-color@v1.4.0/color.go:144:17: undefined: any
../../go/pkg/mod/github.com/!twi!n/go-color@v1.4.0/color.go:144:17: too many errors
note: module requires Go 1.19
# github.com/golang/geo/s2
../../go/pkg/mod/github.com/golang/geo@v0.0.0-20230421003525-6adc56603217/s2/query_entry.go:83:26: undefined: any
../../go/pkg/mod/github.com/golang/geo@v0.0.0-20230421003525-6adc56603217/s2/query_entry.go:89:25: undefined: any
../../go/pkg/mod/github.com/golang/geo@v0.0.0-20230421003525-6adc56603217/s2/regioncoverer.go:126:33: undefined: any
../../go/pkg/mod/github.com/golang/geo@v0.0.0-20230421003525-6adc56603217/s2/regioncoverer.go:131:32: undefined: any
note: module requires Go 1.18

it is important that users know what may be wrong with common issues, I have known this to just be good user experience design and to also guide users! So maybe add a section that tells people how to fix this.

For info towards fixing on Linux

First Check Go Version

go version

if the version is <= Go 1.18 then we obviously need to upgrade so download the latest golang version from https://go.dev/doc/install

from there unpack it into the /usr/bin/ directory and install like so

Note: Users may want to use commands like (rm -rf /usr/bin/go) or (rm -rf /usr/local/go) as specified by the Go documentation to ensure that users can remove the current install of Go

tar -C /usr/local -xzf go1.21.1.linux-amd64.tar.gz

Now export the path for Go

export PATH=$PATH:/usr/bin/go/bin or export PATH=$PATH:/usr/local/go/bin

to ensure that we have installed and unpacked everything correctly.

Now check version

go version

This should be something like this

go version go1.21.1 linux/amd64

now we can go back and recompile the code!

end suggestive note

this is just a good example of users being able to properly help users because some people sadly do not even want to do the work and then complain- it saves you a ton of issues in the future.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions