21 lines
236 B
Go
21 lines
236 B
Go
package main
|
|
|
|
import "fmt"
|
|
|
|
func main() {
|
|
var book Book
|
|
book.auth = "1u1"
|
|
book.name = "aihda"
|
|
changebook(&book)
|
|
fmt.Println(book)
|
|
|
|
}
|
|
func changebook(book *Book) {
|
|
book.auth = "77"
|
|
}
|
|
|
|
type Book struct {
|
|
name string
|
|
auth string
|
|
}
|