# AddGoFeatureFlag

- Module: [CommunityToolkit.Aspire.Hosting.GoFeatureFlag](/reference/api/go/communitytoolkit.aspire.hosting.gofeatureflag.md)
- Version: `13.6.1`
- Kind: `method`
- Defined on: `DistributedApplicationBuilder`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/tree/d9c2addac6f527ef2e33712d290b84574b455a3b)

Adds an GO Feature Flag container resource to the application model. The default image is and the tag is .

## Remarks

Add an GO Feature Flag container to the application model and reference it in a .NET project.
```
var builder = DistributedApplication.CreateBuilder(args);
var goff = builder.AddGoFeatureFlag("goff");
var api = builder.AddProject<Projects.Api>("api")
.WithReference(goff);
builder.Build().Run();
```

## Definition

```go
func (DistributedApplicationBuilder) AddGoFeatureFlag(
    name string,
    options ...*AddGoFeatureFlagOptions,
) GoFeatureFlagResource
```

## Parameters

- `name` (`string`) -- The name of the resource. This name will be used as the connection string name when referenced in a dependency.
- `options` (`...*AddGoFeatureFlagOptions`) -- optional settings, see [Options](#options)

## Options

Optional parameters are passed in a trailing `options ...*AddGoFeatureFlagOptions` argument.

- `PathToConfigFile` (`*string`) -- The path set to find the configuration file (https://gofeatureflag.org/docs/relay-proxy/configure-relay-proxy#configuration-file).
- `Port` (`*float64`) -- The host port to bind the underlying container to.

## Returns

[`GoFeatureFlagResource`](/reference/api/go/communitytoolkit.aspire.hosting.gofeatureflag/gofeatureflagresource.md) -- A reference to the `IResourceBuilder`.

Returns a handle; failures surface later via `Err()`.

## Applies to

- `DistributedApplicationBuilder`
