MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / getValue

Function getValue

pkg/policies/policies.go:790–808  ·  view source on GitHub ↗
(values []string)

Source from the content-addressed store, hash-verified

788}
789
790func getValue(values []string) any {
791 lines := make([]string, 0)
792 for _, line := range values {
793 text := strings.TrimSpace(line)
794 if len(text) > 0 {
795 lines = append(lines, text)
796 }
797 }
798
799 if len(lines) == 0 {
800 // No valid input, skip
801 return nil
802 }
803 if len(lines) > 1 {
804 return lines
805 }
806 // nolint: gosec
807 return lines[0]
808}
809
810// splitArgs splits a comma-separated string into a slice of trimmed values.
811//

Callers 1

getInputArgumentsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected