We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I get the above error when I try to encode a struct using the a variable of type semver.Version. Example struct:
semver.Version
type Test struct { Version semver.Version `json:"version"` Name string `json:"name"` }
Example code to generate the above error:
package main import ( "bytes" "encoding/gob" "fmt" "github.com/Masterminds/semver/v3" ) type Test struct { Version semver.Version `json:"version"` Name string `json:"name"` } func main() { fmt.Println("Hello, 世界") val := Test{} gob.Register(val) v, _ := semver.NewVersion("1.2.3") val.Version = *v fmt.Printf("val: %+v\n", val) buf := bytes.Buffer{} enc := gob.NewEncoder(&buf) if err := enc.Encode(val); err != nil { fmt.Printf("Error while encoding: %v\n\n", err) } ver, _ := semver.NewVersion("1.2.3") gob.Register(ver) if err := enc.Encode(ver); err != nil { fmt.Printf("Error while encoding: %v\n\n", err) } }
The text was updated successfully, but these errors were encountered:
What are you looking for?
Sorry, something went wrong.
Sorry, forgot the issue, I may have bypassed this somehow. Closing it.
No branches or pull requests
I get the above error when I try to encode a struct using the a variable of type
semver.Version
.Example struct:
Example code to generate the above error:
The text was updated successfully, but these errors were encountered: