util

package
v0.9.29 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2019 License: BSD-2-Clause Imports: 8 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ValidUpload = []string{"upload", "gzip", "bzip2"}

Functions

func ApiUrl

func ApiUrl(ctx context.Context) string

func CopyFile

func CopyFile(src string, dst string) (int64, error)

func IsValidFileName

func IsValidFileName(a string) bool

func IsValidParamName

func IsValidParamName(a string) bool

func IsValidUploadFile added in v0.9.5

func IsValidUploadFile(a string) bool

func RandString

func RandString(l int) (s string)

func StringInSlice

func StringInSlice(a string, list []string) bool

func StripSuffix added in v0.9.5

func StripSuffix(file string) string

func ToInt

func ToInt(s string) (i int)

Types

type Query

type Query struct {
	// contains filtered or unexported fields
}

func Q

func Q(l map[string][]string) *Query

func (*Query) All

func (q *Query) All() map[string][]string

func (*Query) Has

func (q *Query) Has(key string) bool

func (*Query) List

func (q *Query) List(key string) []string

func (*Query) Value

func (q *Query) Value(key string) string

Jump to

Keyboard shortcuts

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