util

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2018 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IndentString

func IndentString(str string, indent string) string

IndentString indents str lines (from 2nd one = 1st line is not indented) by indent.

func SliceToBuffer

func SliceToBuffer(buf *bytes.Buffer, items []reflect.Value) *bytes.Buffer

SliceToBuffer stringifies items slice into buf then returns buf.

func TernRune

func TernRune(cond bool, a, b rune) rune

TernRune returns a if cond is true, b otherwise.

func TernStr

func TernStr(cond bool, a, b string) string

TernStr returns a if cond is true, b otherwise.

func ToString

func ToString(val interface{}) string

ToString does it best to stringify val.

Types

This section is empty.

Jump to

Keyboard shortcuts

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