in commands/util.go [430:449]
func getParamUnion(keyValArrAnnots whisk.KeyValueArr, keyValArrParams whisk.KeyValueArr, key string) []string {
var res []string
tag := "*"
if getValueBool(keyValArrAnnots, "final") {
tag = "**"
}
boundParams := getKeys(keyValArrParams)
annotatedParams := getChildValueStrings(keyValArrAnnots, "parameters", key)
res = append(boundParams, annotatedParams...) // Create union of boundParams and annotatedParams with duplication
for i := 0; i < len(res); i++ {
for j := i + 1; j < len(res); j++ {
if res[i] == res[j] {
res = append(res[:j], res[j+1:]...) // Remove duplicate entry
}
}
}
sort.Strings(res)
res = tagBoundParams(boundParams, res, tag)
return res
}