#Go install from GitHub

12 messages · Page 1 of 1 (latest)

midnight cypress
#

with masked urls, it's hard to provide percise support
i am assuming your go.mod mismatches with the url

#

imagine this
go install github.com/TEST/test
but your go.mod claims to be
github.com/test/test
go expects TEST/test(as per url used), but it's not found(instead got test/test)

#

solution: pick one url that will be the canonical url and just go with it whichever you picked
and only use that specified url for everything

oblique plume
#

and the mod file has the same url as github

midnight cypress
#

what's the command used to go install?

#

ah

#
C:\Users\Admin>go install github.com/TechMDW/GoDown
go: 'go install' requires a version when current directory is not in a module
        Try 'go install github.com/TechMDW/GoDown@latest' to install the latest version

C:\Users\Admin>go install github.com/TechMDW/GoDown@latest
go: downloading github.com/TechMDW/GoDown v0.0.1
go: github.com/TechMDW/GoDown@latest: module github.com/TechMDW/GoDown@latest found (v0.0.1), but does not contain package github.com/TechMDW/GoDown

C:\Users\Admin>go install github.com/TechMDW/GoDown/cmd/godown@latest
go: downloading github.com/brianvoe/gofakeit/v6 v6.19.0

C:\Users\Admin>godown
#

you need to use go install github.com/TechMDW/GoDown/cmd/godown@latest

#

not sure about the error message here

#

but github.com/TechMDW/GoDown itself is not an entrypoint, only cmd/godown is

halcyon locust
#

non main package does not generate binary, go install command is to install binary from do module.so it look for main package.
you need to provide path to its package main if its not in the root.
its common and you'll stumble upon alot of them.