-
Notifications
You must be signed in to change notification settings - Fork 192
Working Demo
unisqu edited this page Jun 13, 2018
·
19 revisions
1.Make a temporary folder for this demo
$ mkdir temp
2.Download library
$ go get -u -t github.com/tinylib/msgp
3.Open editor and copy/paste and save the code below:
package main
import (
"fmt"
)
//go:generate msgp
type QryD struct {
A int8
D int8
T string
K string
V string
}
func main() {
fmt.Println("Nothing to see here yet!")
}
4.Run the following command:
$ go generate
5.Two files are generated here, main_ge.go and main_gen_test.go , verify by typing
$ ls -al