MCPcopy
hub / github.com/keploy/keploy / Set

Method Set

pkg/models/const.go:21–29  ·  view source on GitHub ↗

Set must have pointer receiver so it doesn't change the value of a copy

(v string)

Source from the content-addressed store, hash-verified

19
20// Set must have pointer receiver so it doesn't change the value of a copy
21func (e *Language) Set(v string) error {
22 switch v {
23 case "go", "java", "python", "javascript":
24 *e = Language(v)
25 return nil
26 default:
27 return errors.New(`must be one of "go", "java", "python" or "javascript"`)
28 }
29}
30
31// Type is only used in help text
32func (e *Language) Type() string {

Calls 2

LanguageTypeAlias · 0.85
NewMethod · 0.65