Trouble getting started with Open Feature Go provider

I’m trying to get started with openfeature go provider but running into some issues, its possible there is something wrong with my environment. When I run

go get

and then go mod tidy

I see this error:

go: finding module for package
go: imports module found (v0.1.1), but does not contain package

Any ideas?

yeah I just reproduced. let me look into it and ping the openfeature team and will get back to you

thanks for raising this!

1 Like

So the problem is that the actual provider is nested within this module in /pkg/provider. So you have to do the following import to get it:

package main

import (

	flipt ""

func main() {
	// http://localhost:8080 is the default Flipt address

	client := openfeature.NewClient("my-app")
	value, err := client.BooleanValue(context.Background(), "v2_enabled", false, openfeature.NewEvaluationContext(
			"favorite_color": "blue",

	if err != nil {

	if value {
		// do something
	} else {
		// do something else

I just popped open a PR to address this chore(providers/flipt): update README with correct provider import statement by GeorgeMac · Pull Request #496 · open-feature/go-sdk-contrib · GitHub

1 Like

@levlaz this is merged now in the open-feature repo chore(providers/flipt): update README with correct provider import st… · open-feature/go-sdk-contrib@0ac382e · GitHub

after updating the import statement should work now