Add struct for demonstration fillstruct

This commit is contained in:
Alexander Krieg
2019-06-15 13:36:53 +02:00
parent 9a5fb79232
commit 378e01a632

View File

@@ -2,7 +2,22 @@ package hello
import ()
type user struct {
ID int64
Name string
Addr *address
}
type address struct {
City string
ZIP int
LatLng [2]float64
}
var alex = user{}
// Hello writes a welcome string
func Hello() string {
return "Hello golang!"
return "Hello, "+alex.Name
}