예제

완전하고 실행 가능한 litesvm-go 데모 예제입니다. 각 예제는 독립적인 Go 테스트로, 패키지에 추가한 후 go test로 실행할 수 있습니다.

예제 실행

# 1) Initialize a Go module (skip if you already have a go.mod)
go mod init mytest
# 2) Add the dependencies to your Go project
go get github.com/LiteSVM/litesvm-go
go get github.com/gagliardetto/solana-go
# 3) Drop an example into a _test.go file and run
go test ./...

Alpine / musl 환경에서는 올바른 벤더 아카이브가 링크되도록 go test 명령어에 -tags musl을 추가하세요.

독립 실행형 커맨드라인 예제(테스트 러너 없음)는 litesvm-go 저장소의 examples/transfer/main.go 를 참고하세요.

Is this page helpful?

목차

페이지 편집