Get Started
- 1.Clone the gosdk repogit clone https://github.com/0chain/gosdk.git
- 2.Save below code as
sdkversion.go
in thegosdk
directory.
package main
import (
"fmt"
"github.com/0chain/gosdk/zcncore"
)
func main() {
fmt.Println("gosdk version: ", zcncore.GetVersion())
}
- Run the below command to download the gosdk package: (if you don't have gosdk already in your GOPATH)go get github.com/0chain/gosdk
- Build the sample application sdkversion using the command belowgo build -o sdkversion sdkversion.go
- Run the executable./sdkversion
- If it prints the gosdk version installed then you have successfully installed 0chain gosdk.
Sample Response:
gosdk version: v1.8.9-57-g7fbdcff
Last modified 2mo ago