What does the "-" (hyphen) in struct means in Golang?

golang

(Naveen Honest Raj) #1

Example,

type App struct 
{ 
    Id string `json:"id"` 
    Password string `json:"-"` 
}

In the above example, when the JSON parser reads/marshals it, it will skip the password field when converting.