Hello,
Thanks for the response. The Major Issue is that am getting the Data from *json
*and its inconsistent.
Regards
Teety
On Friday, 13 January 2017 14:41:02 UTC+1, mhh...@gmail.com wrote:
>
> Hi,
>
> some simple leads,
>
> Use one line initialization of Person
> p := &Person{Attr:&Attribute{
Expose properties as methods and do the check in the method can make the
caller use easier.
On Fri, Jan 13, 2017, 14:41 wrote:
> Hi,
>
> some simple leads,
>
> Use one line initialization of Person
> p := &Person{Attr:&Attribute{}}
>
> Enhance the if conditions statement
> if p.Attr != nil &
Hi,
some simple leads,
Use one line initialization of Person
p := &Person{Attr:&Attribute{}}
Enhance the if conditions statement
if p.Attr != nil && p.Attr.Age < 10 {
fmt.Println("Too Young")
}
Use a Person constructor
func NewPerson() &Person {
return &Person{Attr:&Attribut