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'd like to create a type generator that takes a type like this:
// url:"prefix:s3" type S3 struct { Endpoint string `url:"host"` Bucket string `url:"path[0]"` Key string `url:"path[1]"` } // url:"prefix:gcs" type GCS struct { Endpoint string `url:"host"` Bucket string `url:"path[0]"` Key string `url:"path[1]"` }
And this would generate the following funcs:
func (x S3) String() string { return "s3://" + x.Endpoint + "/" + x.Bucket + "/" + x.Key } func ParseS3(x string) (S3,error) { u, err:=url.Parse( if err!=nil {return err} parts:=strings.Split(u.Path) return S3{Endpoint: u.Host, Bucket: parts[0], Key: parts[1]} }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'd like to create a type generator that takes a type like this:
And this would generate the following funcs:
The text was updated successfully, but these errors were encountered: