forked from ardanlabs/gotraining
-
Notifications
You must be signed in to change notification settings - Fork 0
/
template2.go
30 lines (21 loc) · 916 Bytes
/
template2.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// All material is licensed under the Apache License Version 2.0, January 2004
// http://www.apache.org/licenses/LICENSE-2.0
// http://play.golang.org/p/b6-FNFOToO
// Declare a struct type and create a value of this type. Declare a function
// that can change the value of some field in this struct type. Display the
// value before and after the call to your function.
package main
// Add imports.
// Declare a type named user.
// Create a function that changes the value of one of the user fields.
func funcName( /* add pointer parameter, add value parameter */ ) {
// Use the pointer to change the value that the
// pointer points to.
}
// main is the entry point for the application.
func main() {
// Create a variable of type user and initialize each field.
// Display the value of the variable.
// Share the variable with the function you declared above.
// Display the value of the variable.
}