Skip to content
New issue

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

Fields media type "bottle" specified how primitive types #14

Open
njspok opened this issue Aug 30, 2016 · 0 comments
Open

Fields media type "bottle" specified how primitive types #14

njspok opened this issue Aug 30, 2016 · 0 comments

Comments

@njspok
Copy link

njspok commented Aug 30, 2016

I run goagen bootstrap and get struct all fields specify how pointer (int, string e.t.c). But this example struct Bottle

type Bottle struct {
    // Account that owns bottle
    Account *AccountTiny `form:"account,omitempty" json:"account,omitempty" xml:"account,omitempty"`
    // API href of bottle
    Href string `form:"href" json:"href" xml:"href"`
    // ID of bottle
    ID int `form:"id" json:"id" xml:"id"`
    // Links to related resources
    Links *BottleLinks `form:"links,omitempty" json:"links,omitempty" xml:"links,omitempty"`

    // todo maybe Name *string ???
    Name  string       `form:"name" json:"name" xml:"name"`

    // Rating of bottle between 1 and 5
    Rating   *int   `form:"rating,omitempty" json:"rating,omitempty" xml:"rating,omitempty"`
    Varietal string `form:"varietal" json:"varietal" xml:"varietal"`
    Vineyard string `form:"vineyard" json:"vineyard" xml:"vineyard"`
    Vintage  int    `form:"vintage" json:"vintage" xml:"vintage"`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant