MCPcopy Create free account
hub / github.com/gokcehan/lf / getLocalOptWords

Function getLocalOptWords

complete.go:146–162  ·  view source on GitHub ↗
(localOpts any)

Source from the content-addressed store, hash-verified

144}
145
146func getLocalOptWords(localOpts any) (localOptWords []string) {
147 t := reflect.TypeOf(localOpts)
148 for i := range t.NumField() {
149 field := t.Field(i)
150 name := field.Name
151 if field.Type.Kind() != reflect.Map {
152 continue
153 }
154 if field.Type.Elem().Kind() == reflect.Bool {
155 localOptWords = append(localOptWords, name, "no"+name, name+"!")
156 } else {
157 localOptWords = append(localOptWords, name)
158 }
159 }
160 sort.Strings(localOptWords)
161 return
162}
163
164func getLongest(s1, s2 string) string {
165 r1 := []rune(s1)

Callers 2

TestGetLocalOptWordsFunction · 0.85
complete.goFile · 0.85

Calls

no outgoing calls

Tested by 1

TestGetLocalOptWordsFunction · 0.68