utils

package
v0.0.0-...-e2ffb22 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpMemStats

func DumpMemStats()

func LogError

func LogError(err error, format string, args ...interface{})

LogError is used to ignore an error but log it.

func ReadJsonFile

func ReadJsonFile(fn string, data interface{}) error

func SegmentLess

func SegmentLess(a, b Segment) bool

func SplitPackage

func SplitPackage(pkg string) (site, path string)

func WriteJsonFile

func WriteJsonFile(fn string, data interface{}) error

Types

type Segment

type Segment string

func (Segment) Done

func (s Segment) Done() error

func (Segment) IsDone

func (s Segment) IsDone() bool

func (Segment) Join

func (s Segment) Join(name string) string

func (Segment) ListFiles

func (s Segment) ListFiles() ([]string, error)

func (Segment) Make

func (s Segment) Make() error

func (Segment) Name

func (s Segment) Name() string

func (Segment) Remove

func (s Segment) Remove() error

type Segments

type Segments string

func (Segments) ClearUndones

func (ss Segments) ClearUndones() error

func (Segments) FindMaxDone

func (ss Segments) FindMaxDone() (Segment, error)

func (Segments) GenMaxSegment

func (ss Segments) GenMaxSegment() (Segment, error)

func (Segments) GenNewSegment

func (ss Segments) GenNewSegment() (Segment, error)

func (Segments) Join

func (ss Segments) Join(sub string) Segment

func (Segments) ListAll

func (ss Segments) ListAll() ([]Segment, error)

func (Segments) ListDones

func (ss Segments) ListDones() ([]Segment, error)

type Size

type Size int64

func (Size) String

func (s Size) String() string

Jump to

Keyboard shortcuts

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