Skip to main content
Version: v1.40.0

File

The File Retriever will read a local file to get your flags.

tip

Using a file to store your flags is not recommend, except if it is in a shared folder for all your services.

Example

import 	"github.com/thomaspoignant/go-feature-flag/retriever/file"
// ...

err := ffclient.Init(ffclient.Config{
PollingInterval: 3 * time.Second,
Retriever: &fileretriever.Retriever{
Path: "file-example.yaml",
},
})
defer ffclient.Close()

Configuration fields

To configure your File retriever:

FieldDescription
Pathlocation of your file on the file system.

Get the latest GO Feature Flag updates