util

package
v4.3.12+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2019 License: MIT Imports: 5 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

View Source
var VERSION = "4.3.12"

VERSION identifies Khan's current version

Functions

func NowMilli

func NowMilli() int64

NowMilli returns now in milliseconds since epoch

Types

type Level

type Level struct {
	Key   string
	Value int
}

Level maps levels

type LevelsList

type LevelsList []Level

LevelsList allows sorting levels by the int value

func SortLevels

func SortLevels(levels map[string]interface{}) LevelsList

SortLevels sorts levels

func (LevelsList) Len

func (l LevelsList) Len() int

func (LevelsList) Less

func (l LevelsList) Less(i, j int) bool

func (LevelsList) Swap

func (l LevelsList) Swap(i, j int)

type TypeConverter

type TypeConverter struct{}

TypeConverter type

func (TypeConverter) FromDb

func (tc TypeConverter) FromDb(target interface{}) (gorp.CustomScanner, bool)

FromDb converts target from string to json

func (TypeConverter) ToDb

func (tc TypeConverter) ToDb(val interface{}) (interface{}, error)

ToDb converts val from json to string

Jump to

Keyboard shortcuts

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