package main type Challenge struct { Name string Description string Flag string // this should never leave the server FoundFlag bool FlagTries uint Container string // this could, but is not required as well Category string } type StrippedChallenge struct { Name string `json:"name"` Description string `json:"description"` Category string `json:"category"` FoundFlag bool `json:"foundFlag"` } func stripChallenge(c Challenge) (StrippedChallenge) { return StrippedChallenge{ Name: c.Name, Description: c.Description, Category: c.Category, FoundFlag: c.FoundFlag, } }