Skip to content

Instantly share code, notes, and snippets.

@TheLunaticScripter
Created September 9, 2021 17:12
Show Gist options
  • Save TheLunaticScripter/da1248b35db0606e40cdab71d1eb5219 to your computer and use it in GitHub Desktop.
Save TheLunaticScripter/da1248b35db0606e40cdab71d1eb5219 to your computer and use it in GitHub Desktop.
opa_sdk_blog_code2.go
package main
import (
"bytes"
...
"github.com/open-policy-agent/opa/sdk"
)
func main() {
...
opa, err := sdk.New(ctx, sdk.Options{
Config: bytes.NewReader(config),
})
if err != nil {
panic(err)
}
defer opa.Stop(ctx)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment