utils

package
Version: v0.0.0-...-368729d Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompactJSON

func CompactJSON(j string) ([]byte, error)

CompactJSON removes all whitespaces between json keys and values that is not required

func CompareJSONDecode

func CompareJSONDecode(j string, v interface{}) error

CompareJSONDecode decodes a JSON string into a provided interface and then back to a json string. If the output json string does not match the compact version of the input string a error is returned

func CompareStructToJSON

func CompareStructToJSON(v interface{}, j string) error

CompareStructToJSON compares Marshaled interface to a JSON string and returns an error if they do not match

func DiffStrings

func DiffStrings(s1, s2 string) error

DiffStrings prints a nice compare between strings. Error is returned if strings are not equal

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL