Skip to main content
Glama

protolint-mcp

by yoheimuta
autoDisableFlag.go902 B
package lint import ( "fmt" "github.com/yoheimuta/protolint/linter/autodisable" ) type autoDisableFlag struct { raw string autoDisableType autodisable.PlacementType } func (f *autoDisableFlag) String() string { return fmt.Sprint(f.raw) } func (f *autoDisableFlag) Set(value string) error { if f.autoDisableType != 0 { return fmt.Errorf("auto_disable is already set") } r, err := GetAutoDisableType(value) if err != nil { return err } f.raw = value f.autoDisableType = r return nil } // GetAutoDisableType returns a type from the specified key. func GetAutoDisableType(value string) (autodisable.PlacementType, error) { rs := map[string]autodisable.PlacementType{ "next": autodisable.Next, "this": autodisable.ThisThenNext, } if r, ok := rs[value]; ok { return r, nil } return autodisable.Noop, fmt.Errorf(`available auto_disable are "next" and "this"`) }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yoheimuta/protolint'

If you have feedback or need assistance with the MCP directory API, please join our Discord server