package main
import (
"fmt"
)
type G struct {
Str string
Int int
}
func (g G) Getstr() (string,error) {
//var err error
if g.Str == ""{
fmt.Println("is a errors")
}
return g.Str,nil
}
x:=&G{"",19}
sss,err:=x.Getstr()
if err != nil{
fmt.Println(err) //is a errors
}
fmt.Println(sss)