(ctx context.Context)
| 127 | } |
| 128 | |
| 129 | func ConfigFromContext(ctx context.Context) *Config { |
| 130 | if v := ctx.Value(configKey); v != nil { |
| 131 | return v.(*Config) |
| 132 | } |
| 133 | return nil |
| 134 | } |
| 135 | |
| 136 | func ConfigFromCmd(cmd *cobra.Command) *Config { |
| 137 | return ConfigFromContext(cmd.Context()) |