package strslice
import "github.com/docker/engine-api/types/strslice"
Index ¶
Types ¶
type StrSlice ¶
type StrSlice struct {
// contains filtered or unexported fields
}
StrSlice represents a string or an array of strings. We need to override the json decoder to accept both options.
func New ¶
New creates an StrSlice based on the specified parts (as strings).
func (*StrSlice) Len ¶
Len returns the number of parts of the StrSlice.
func (*StrSlice) MarshalJSON ¶
MarshalJSON Marshals (or serializes) the StrSlice into the json format. This method is needed to implement json.Marshaller.
func (*StrSlice) Slice ¶
Slice gets the parts of the StrSlice as a Slice of string.
func (*StrSlice) ToString ¶
ToString gets space separated string of all the parts.
func (*StrSlice) UnmarshalJSON ¶
UnmarshalJSON decodes the byte slice whether it's a string or an array of strings. This method is needed to implement json.Unmarshaler.
Source Files ¶
- Version
- v0.2.2
- Published
- Jan 14, 2016
- Platform
- js/wasm
- Imports
- 2 packages
- Last checked
- 2 hours ago –
Tools for package owners.