Documentation ¶
Index ¶
- Variables
- func ArrayKeys(mmap map[interface{}]interface{}) (keys []interface{})
- func Call(obj interface{}, name string, args ...interface{}) []reflect.Value
- func Ck(set interface{}) bool
- func ConvertUtf8(stream io.ReadCloser) io.Reader
- func GzipString(s string) string
- func Headers(w *http.ResponseWriter)
- func Keys(v interface{}) ([]string, error)
- func MapString(m MII, glue string, order SI) string
- func MbSubstr(s string, from, length int) string
- func Must(i interface{}, err error) interface{}
- func ParseUrls(urls map[string]string) map[string]*url.URL
- func RegSplit(text string, delimeter string, keep bool) []string
- func Reverse(s string) string
- func Seconds(secs int) time.Duration
- type Ca
- type I
- type LanguageCode
- type MII
- type MISI
- type SI
- type SMII
- type TextReq
- type UA
Constants ¶
This section is empty.
Variables ¶
var Cache = Ca{}
var Langs = map[string]map[string]string{}/* 206 elements not displayed */
var Lc = &LanguageCode{&Langs}
var NoExpiration = cache.NoExpiration
Functions ¶
func ArrayKeys ¶
func ArrayKeys(mmap map[interface{}]interface{}) (keys []interface{})
ArrayKeys returns the keys of a map as an array
func ConvertUtf8 ¶
func ConvertUtf8(stream io.ReadCloser) io.Reader
ConvertUtf8 takes a stream and returns it into a reader converting the bytes to utf8
func Headers ¶
func Headers(w *http.ResponseWriter)
func MbSubstr ¶
https://gist.github.com/sisteamnik/c866cb7eed264ea3408d MbSubstr get a multibyte wise substring
func Must ¶
func Must(i interface{}, err error) interface{}
Must returns the value of a value, error function
Types ¶
type I ¶
type I interface{}
struct needs points to be assigned directly (with [k] = v instead of {k:v}
type LanguageCode ¶
func (*LanguageCode) Convert ¶
func (lc *LanguageCode) Convert(value string) string
type TextReq ¶
func NewTextReq ¶
func NewTextReq() *TextReq
func (*TextReq) Pt ¶
func (txtrq *TextReq) Pt(input map[string]*string, glue string, limit int, service *string) (SMII, MISI)
NOTE: this algo does not always return the same values because it ranges over a map, which means that depending on strings lenghts mapped, the linear chars + strl check differs depending on which string is being iterated. Any more complex non linear normalization that would return a consistent value is not really worth the effort since requests are split and unordered anyway. The fact that it returns different values means that requests for the same map of strings can vary up to n * sumof(input[k])