MCPcopy
hub / github.com/docker/compose / IsFeatureEnabled

Method IsFeatureEnabled

internal/desktop/client.go:170–176  ·  view source on GitHub ↗

IsFeatureEnabled checks the feature flag (GET /features) for a given feature. Returns true when the feature is rolled out.

(ctx context.Context, feature string)

Source from the content-addressed store, hash-verified

168// IsFeatureEnabled checks the feature flag (GET /features) for a given
169// feature. Returns true when the feature is rolled out.
170func (c *Client) IsFeatureEnabled(ctx context.Context, feature string) (bool, error) {
171 flags, err := c.FeatureFlags(ctx)
172 if err != nil {
173 return false, err
174 }
175 return flags[feature].Enabled, nil
176}
177
178// IsFeatureActive reports whether Docker Desktop is the active engine and the
179// given feature flag is enabled. Returns false silently on any failure — the

Callers 1

IsFeatureActiveFunction · 0.95

Calls 1

FeatureFlagsMethod · 0.95

Tested by

no test coverage detected