MCPcopy Create free account
hub / github.com/rabbitstack/fibratus / GetStringSlice

Method GetStringSlice

pkg/event/param.go:658–668  ·  view source on GitHub ↗

GetStringSlice returns the string slice from the event parameter.

(name string)

Source from the content-addressed store, hash-verified

656
657// GetStringSlice returns the string slice from the event parameter.
658func (pars Params) GetStringSlice(name string) ([]string, error) {
659 par, err := pars.GetSlice(name)
660 if err != nil {
661 return nil, err
662 }
663 v, ok := par.([]string)
664 if !ok {
665 return nil, fmt.Errorf("unable to type cast %q parameter to string slice", name)
666 }
667 return v, nil
668}
669
670// GetSlice returns the slice of generic values from the parameter.
671func (pars Params) GetSlice(name string) (params.Value, error) {

Callers 4

InitFromViperMethod · 0.45
initFromViperMethod · 0.45
initFromViperMethod · 0.45
InitFromViperMethod · 0.45

Calls 1

GetSliceMethod · 0.95

Tested by

no test coverage detected