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

Method Strings

app/controlplane/pkg/data/ent/ent.go:342–351  ·  view source on GitHub ↗

Strings returns list of strings from a selector. It is only allowed when selecting one field.

(ctx context.Context)

Source from the content-addressed store, hash-verified

340
341// Strings returns list of strings from a selector. It is only allowed when selecting one field.
342func (s *selector) Strings(ctx context.Context) ([]string, error) {
343 if len(*s.flds) > 1 {
344 return nil, errors.New("ent: Strings is not achievable when selecting more than 1 field")
345 }
346 var v []string
347 if err := s.scan(ctx, &v); err != nil {
348 return nil, err
349 }
350 return v, nil
351}
352
353// StringsX is like Strings, but panics if an error occurs.
354func (s *selector) StringsX(ctx context.Context) []string {

Callers 15

StringsXMethod · 0.95
StringMethod · 0.95
outputMaterialsFunction · 0.80
CollectMethod · 0.80
injectAnnotationsMethod · 0.80
injectAnnotationsMethod · 0.80
TestBuildFunction · 0.80
computeCombinedHashFunction · 0.80
extractReferrersFunction · 0.80
DailyRunsCountMethod · 0.80
FieldsMethod · 0.80

Calls

no outgoing calls

Tested by 1

TestBuildFunction · 0.64