Esempi

Esempi completi ed eseguibili che illustrano litesvm-go. Ogni esempio è un test Go autonomo che puoi inserire in un pacchetto ed eseguire con go test.

Esecuzione degli Esempi

# 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 ./...

Su Alpine / musl, aggiungi -tags musl al comando go test in modo che venga collegato l'archivio vendor corretto.

Per un esempio standalone da riga di comando (senza test runner), consulta examples/transfer/main.go nella repo litesvm-go.

Is this page helpful?

Indice dei contenuti

Modifica pagina
© 2026 Solana Foundation. Tutti i diritti riservati.