This is a creation in Article, where the information may have evolved or changed.
Many students, such as I like Golang, but still need to call a lot of legacy projects or other excellent open source projects, how to do? The way we think about it is to combine CGO with the Syscall in the package.
Note that there are pits here:
Show not enough arguments in call to Syscall when I debug. Syscall
[' Go run Dms.go ' | done:260.3744ms]
# command-line-arguments
. \dms.go:72:not enough arguments in call to Syscall. Syscall
Exit Status 2
Because I'm referring to the http://golang.org/pkg/syscall/#Syscall, and its default is Linux/unix's Syscall API doc description,
How to look at Windows Golang Doc?
Act 1:
by Godoc command, call godoc-http=:6060
Then open the http://localhost:6060/pkg/syscall/#Syscall in the browser, which is the Golang package API for Windows
Law 2:Http://golang.org/src/pkg/syscall/syscall_windows.go
Project Combat
Mifare card Read and write:
Lib:
Https://github.com/philsong/golang_samples/blob/master/src/mif/mif.go
TestApp
Https://github.com/philsong/golang_samples/tree/master/src/dms
The end.