util

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2017 License: MPL-2.0 Imports: 11 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

Overview

Package util contains a few simple utilites that has no internal dependencies. This is to encourage reuse of code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(name string) func(string, ...interface{})

Debug will return a debug(format, arg, arg...) function for which messages will be printed if the DEBUG environment variable is set.

This is useful for development debugging only. Do not use this for messages that has any value in production.

func Download added in v0.0.7

func Download(url, destdir string) (string, error)

Download downloads the request file in the url

Types

type StringList added in v0.0.11

type StringList []string

StringList is a list of strings and useful methods

func (*StringList) Add added in v0.0.11

func (s *StringList) Add(values ...string)

Add a list of strings

func (*StringList) Contains added in v0.0.11

func (s *StringList) Contains(value string) bool

Contains returns true if s contains value

func (*StringList) Join added in v0.0.11

func (s *StringList) Join(sep string) string

Join concatenates elements fo the list with given separator

func (*StringList) Sprint added in v0.0.11

func (s *StringList) Sprint(a ...interface{})

Sprint adds a string using fmt.Sprint syntax

func (*StringList) Sprintf added in v0.0.11

func (s *StringList) Sprintf(format string, a ...interface{})

Sprintf adds a string using fmt.Sprintf syntax

Jump to

Keyboard shortcuts

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