(ctx context.Context, client *desktop.Client)
| 48 | } |
| 49 | |
| 50 | func (s *State) Load(ctx context.Context, client *desktop.Client) error { |
| 51 | if !s.active { |
| 52 | // user opted out of experiments globally, no need to load state from |
| 53 | // Desktop |
| 54 | return nil |
| 55 | } |
| 56 | |
| 57 | if client == nil { |
| 58 | // not running under Docker Desktop |
| 59 | return nil |
| 60 | } |
| 61 | |
| 62 | desktopValues, err := client.FeatureFlags(ctx) |
| 63 | if err != nil { |
| 64 | return err |
| 65 | } |
| 66 | s.desktopValues = desktopValues |
| 67 | return nil |
| 68 | } |