Add struct for demonstration fillstruct
This commit is contained in:
		@@ -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
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user