convext

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: MIT Imports: 3 Imported by: 5

Documentation

Overview

Package convext (convert extensions) are helpers for converting things.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Must

func Must(e error)

func MustMarshal

func MustMarshal(o interface{}) string

func MustParseBool

func MustParseBool(s string) bool

func MustParseFloat

func MustParseFloat(s string) float64

func MustParseInt

func MustParseInt(s string) int

func MustString

func MustString(s string, e error) string

func MustToObject

func MustToObject(o interface{}) map[string]interface{}

func MustUnmarshal

func MustUnmarshal(b []byte, ptr interface{})

func SortedObjectKeys

func SortedObjectKeys(o map[string]interface{}) []string

func ToObject

func ToObject(o interface{}) (map[string]interface{}, error)

ToObject converts o to json, and then parses it into an object. Useful when you need to get the fields for an object, like for log fields. This is slow, so use it sparingly- if you need it to be fast, create a method on your type.

Types

This section is empty.

Jump to

Keyboard shortcuts

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