github.com/seeker-insurance/kit@v0.0.13/brewerydb/structs/brewery.go (about)

     1  package structs
     2  
     3  type Brewery struct {
     4  	ID             string `json:"id,omitempty"`
     5  	Name           string `json:"name,omitempty"`
     6  	Description    string `json:"description,omitempty"`
     7  	Website        string `json:"website,omitempty"`
     8  	Established    string `json:"established,omitempty"`
     9  	MailingListURL string `json:"mailingListUrl,omitempty"`
    10  	IsOrganic      bool   `json:"isOrganic,omitempty"`
    11  	Images         Images `json:"images,omitempty"`
    12  }
    13  
    14  func booleanVal(b []byte) (val bool, ok bool) {
    15  	switch string(b) {
    16  	case "true", "Y":
    17  		return true, true
    18  	case "false", "N", "":
    19  		return false, true
    20  	default:
    21  		return false, false
    22  	}
    23  }