[go-nuts] How to detect source of a dependency in go.mod

2019-05-07 Thread tamal
I am trying to convert https://github.com/appscode/voyager from glide to go mod. I am getting an error like below: ``` go: github.com/Sirupsen/logrus@v1.4.1: parsing go.mod: unexpected module path "github.com/sirupsen/logrus" go: error loading module requirements ``` How do I find out the sourc

[go-nuts] Add a method to initialize string

2017-03-21 Thread tamal
Hi, I keep finding myself writing the following method often when working with GO code. I wonder if this can be added to `strings` pkg. func get(s, init string) string { if s == "" { return init } return s } Thanks. -- You received this message because you are subscribed to the Google Groups

[go-nuts] Generate string to enum using stringer.

2017-02-09 Thread tamal
Hi, We would like to be able to generate string to enum value method using stringer in addition to String() method. https://github.com/golang/tools/blob/master/cmd/stringer/stringer.go Is this something that can be added to Stringer? If yes, what is the process for that? Thanks. -- You receiv

[go-nuts] How to create self-signed certificate with custom extension?

2016-12-06 Thread tamal
HI, I am trying to create a self-signed certificate with some custom data encoded as a custom extension. From the x509 doc, https://golang.org/pkg/crypto/x509/#CreateCertificate "CreateCertificate creates a new certificate based on a template. The following members of template are used: SerialN