Go SDK
Gov1.6.3
Terminal window
Installation
Section titled “Installation”go get github.com/flags-gg/go-flagsQuick Start
Section titled “Quick Start”package main
import ( "fmt" flags "github.com/flags-gg/go-flags")
func main() { client := flags.NewClient( flags.WithAuth(flags.Auth{ ProjectID: "your-project-id", AgentID: "your-agent-id", EnvironmentID: "your-environment-id", }), )
if client.Is("new-feature").Enabled() { fmt.Println("Feature is enabled!") }}Listing Flags
Section titled “Listing Flags”allFlags, err := client.List()if err != nil { log.Fatal(err)}
for _, flag := range allFlags { fmt.Printf("%s: %v\n", flag.Details.Name, flag.Enabled)}