[go-nuts] Re: The latest version of package in pkg.go.dev

2020-08-15 Thread seank...@gmail.com
that's an invalid semver, no leading 0s allowed https://semver.org/#spec-item-2 : A normal version number MUST take the form X.Y.Z where X, Y, and Z are non-negative integers, and MUST NOT contain leading zeroes. X is the major version, Y is the minor version, and Z is the patch version. Each

[go-nuts] Re: best way to know executable version without running it

2020-08-13 Thread seank...@gmail.com
go version -m On Thursday, August 13, 2020 at 10:30:56 AM UTC+2 santhoshth...@gmail.com wrote: > Hi All, > > What is best way to know a executable version without executing it through > golang? > > I tried with reading the executable file through a scanner and matching > every line with

Re: [go-nuts] var fn myHandler = func(){ fn }

2020-07-12 Thread seank...@gmail.com
https://github.com/golang/go/issues/33167 On Sunday, July 12, 2020 at 10:44:02 PM UTC+2 axel.wa...@googlemail.com wrote: > On Sun, Jul 12, 2020 at 9:33 PM Bakul Shah wrote: > >> On Jul 12, 2020, at 11:11 AM, Gert wrote: >> > >> > https://play.golang.org/p/6xMgjr1IyFD >> > >> > var fn

[go-nuts] Re: clean unused packages in $GOPATH/pkg/mod

2020-07-07 Thread seank...@gmail.com
go clean -modcache On Tuesday, July 7, 2020 at 9:23:50 AM UTC+2 HailangGe wrote: > > Thanks. I'm just trying to look for if there are any way to clean them in > a programmer's way. > 在2020年7月7日星期二 UTC+8 下午1:26:16 写道: > >> Just delete them all. >> Your next build will repopulate the ones that

[go-nuts] Re: Building multiple executables from one module

2020-06-30 Thread seank...@gmail.com
go build -o output_directory ./... On Tuesday, June 30, 2020 at 12:58:05 PM UTC+2 b.ca...@pobox.com wrote: > Suppose I have a tree of files like this, to build two executables: > > ==> ./go.mod <== > module example.com/test > > go 1.14 > > ==> ./shared.go <== > package example > > const Answer =

[go-nuts] Re: accessibility of module version information in executable

2020-06-26 Thread seank...@gmail.com
go version -m $binary runtime/debug.BuildInfo On Friday, June 26, 2020 at 6:13:56 PM UTC+2 Marvin Renich wrote: > When building a command with go build that imports modules, does the > resulting executable contain information about which modules are > included as well as their versions? > > If