I was porting my npm nodule to go package and at one place i need to do this.
type Credentials struct {
key string
responseType string
subscription string
locale string
}
type WwogcParams struct {
name string
value string
}
func main() {
param1 := WwogcParams{"q","Delhi"}
wwogc := []WwogcParams{param1}
credentials := Credentials{key: "keykeykle",responseType: "json",subscription: "premium",locale: "EN"}
....
}
The main function here is basically what the user will have to write but what I was thinking if the user can use the struct I have defined inside the package in his main() function.
Why I can't use the structure outside its package?