conv

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertSourceToJSONStrIfPossible

func ConvertSourceToJSONStrIfPossible(source interface{}) string

ConvertSourceToJSONStrIfPossible converts any json capable types to str if not possible standard formatter is used

func ConvertToBool

func ConvertToBool(val interface{}) bool

func ConvertToFileMode

func ConvertToFileMode(val interface{}) (os.FileMode, error)

func ConvertToValues

func ConvertToValues(val interface{}, path string) ([]string, error)

Types

type KeyValue

type KeyValue struct {
	Key   string
	Value string
}

func (KeyValue) ToEqualSignString

func (kv KeyValue) ToEqualSignString() string

type KeyValues

type KeyValues []KeyValue

func ConvertToKeyValues

func ConvertToKeyValues(val interface{}, path string) (KeyValues, error)

func (KeyValues) ToEqualSignStrings

func (kvs KeyValues) ToEqualSignStrings() []string

Jump to

Keyboard shortcuts

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