stringslice

package
v3.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2024 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RawStringSlice

type RawStringSlice struct {
	StringSlice
}

func NewRawStringSlice

func NewRawStringSlice(value interface{}) *RawStringSlice

func (RawStringSlice) JSONSchemaAlias

func (rawStringSlice RawStringSlice) JSONSchemaAlias() any

func (*RawStringSlice) Normalize

func (rawStringSlice *RawStringSlice) Normalize(value string) string

func (*RawStringSlice) UnmarshalYAML

func (rawStringSlice *RawStringSlice) UnmarshalYAML(unmarshal func(interface{}) error) error

type StringOrSlice

type StringOrSlice string

func (StringOrSlice) JSONSchema

func (StringOrSlice) JSONSchema() *jsonschema.Schema

type StringSlice

type StringSlice struct {
	Value interface{}
}

StringSlice represents a single (in-lined) or multiple string value(s). The unmarshaller does not automatically convert in-lined strings to []string, hence the interface{} type is required.

func New

func New(value interface{}) StringSlice

func (*StringSlice) IsEmpty

func (stringSlice *StringSlice) IsEmpty() bool

func (StringSlice) JSONSchemaAlias

func (stringSlice StringSlice) JSONSchemaAlias() any

Implement alias for stringslice and reuse it everywhere

func (StringSlice) MarshalJSON

func (stringSlice StringSlice) MarshalJSON() ([]byte, error)

func (StringSlice) MarshalYAML

func (stringSlice StringSlice) MarshalYAML() (interface{}, error)

func (StringSlice) Normalize

func (stringSlice StringSlice) Normalize(value string) string

func (StringSlice) String

func (stringSlice StringSlice) String() string

func (StringSlice) ToSlice

func (stringSlice StringSlice) ToSlice() []string

func (*StringSlice) UnmarshalJSON

func (stringSlice *StringSlice) UnmarshalJSON(data []byte) error

func (*StringSlice) UnmarshalYAML

func (stringSlice *StringSlice) UnmarshalYAML(unmarshal func(interface{}) error) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL