fmt.Fprintf(os.Stderr,"ERROR: field %v.%v cannot have a default value and not have a getter method",generator.CamelCase(*msg.Name),generator.CamelCase(*field.Name))
os.Exit(1)
}
ifface{
fmt.Fprintf(os.Stderr,"ERROR: field %v.%v cannot have a default value be in a face",generator.CamelCase(*msg.Name),generator.CamelCase(*field.Name))
os.Exit(1)
}
}
ifgogoproto.IsNullable(field){
continue
}
iflen(field.GetDefaultValue())>0{
fmt.Fprintf(os.Stderr,"ERROR: field %v.%v cannot be non-nullable and have a default value",generator.CamelCase(*msg.Name),generator.CamelCase(*field.Name))
fmt.Fprintf(os.Stderr,"WARNING: field %v.%v is a repeated non-nullable native type, nullable=false has no effect\n",generator.CamelCase(*msg.Name),generator.CamelCase(*field.Name))
}elseifproto3{
fmt.Fprintf(os.Stderr,"ERROR: field %v.%v is a native type and in proto3 syntax with nullable=false there exists conflicting implementations when encoding zero values",generator.CamelCase(*msg.Name),generator.CamelCase(*field.Name))
os.Exit(1)
}
iffield.IsBytes(){
fmt.Fprintf(os.Stderr,"WARNING: field %v.%v is a non-nullable bytes type, nullable=false has no effect\n",generator.CamelCase(*msg.Name),generator.CamelCase(*field.Name))
fmt.Fprintf(os.Stderr,"ERROR: field %v.%v cannot be non-nullable and be an enum type %v which does not start with zero",generator.CamelCase(*msg.Name),generator.CamelCase(*field.Name),enum.GetName())
os.Exit(1)
}
}
}
for_,e:=rangefile.GetExtension(){
if!gogoproto.IsNullable(e){
fmt.Fprintf(os.Stderr,"ERROR: extended field %v cannot be nullable %v",generator.CamelCase(e.GetName()),generator.CamelCase(*e.Name))