MCPcopy Create free account
hub / github.com/apache/openwhisk-cli / fieldExists

Function fieldExists

commands/util.go:1011–1021  ·  view source on GitHub ↗
(value interface{}, field string)

Source from the content-addressed store, hash-verified

1009}
1010
1011func fieldExists(value interface{}, field string) bool {
1012 element := reflect.ValueOf(value).Elem()
1013
1014 for i := 0; i < element.NumField(); i++ {
1015 if strings.ToLower(element.Type().Field(i).Name) == strings.ToLower(field) {
1016 return true
1017 }
1018 }
1019
1020 return false
1021}
1022
1023func printField(value interface{}, field string) {
1024 var matchFunc = func(structField string) bool {

Callers 5

activation.goFile · 0.85
rule.goFile · 0.85
package.goFile · 0.85
trigger.goFile · 0.85
action.goFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected