Skip to content

Instantly share code, notes, and snippets.

@tore-statsig
Created August 12, 2021 22:23
Show Gist options
  • Save tore-statsig/2e1708a21bf277bdf7db3d9b7fe2a892 to your computer and use it in GitHub Desktop.
Save tore-statsig/2e1708a21bf277bdf7db3d9b7fe2a892 to your computer and use it in GitHub Desktop.
statsig go c-style shared lib
package main
import "C"
import (
statsig "github.com/statsig-io/go-sdk"
"github.com/statsig-io/go-sdk/types"
)
//export Initialize
func Initialize(sdkKey string) {
statsig.Initialize(sdkKey)
}
//export CheckGate
func CheckGate(uid string, gate string) bool {
user := types.StatsigUser{UserID: uid}
return statsig.CheckGate(user, gate)
}
func main() {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment