Skip to content

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

@njspok

Description

@njspok

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"`
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions