Created
September 9, 2021 17:12
-
-
Save TheLunaticScripter/da1248b35db0606e40cdab71d1eb5219 to your computer and use it in GitHub Desktop.
opa_sdk_blog_code2.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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