utils

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2020 License: Apache-2.0 Imports: 6 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

func ExpandPath

func ExpandPath(p string) string

ExpandPath replaces common path aliases: ~ -> $HOME

func HashString

func HashString(s string) (string, error)

HashString Takes String and returns a sha1 hash represented as a string

func SanitizeString

func SanitizeString(s string) string

SanitizeString iterated a strings and removes any characters not in the allow list

func StringSlicesEqual

func StringSlicesEqual(l, r []string) bool

func StringSlicesEqualIgnoreOrder

func StringSlicesEqualIgnoreOrder(l, r []string) bool

func YAMLToJSON

func YAMLToJSON(yamlBytes []byte) ([]byte, error)

YAMLToJSON converts yaml to json

func YamlMarshal

func YamlMarshal(o interface{}) ([]byte, error)

YamlMarshal trys to marshal the input struct into yaml content

func YamlUnmarshal

func YamlUnmarshal(yamlBytes []byte, dest interface{}) error

YamlUnmarshal unmarshals the yaml content to an interface

Types

This section is empty.

Jump to

Keyboard shortcuts

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