Documentation ¶
Index ¶
- func LoadKeyStore(keyfile, passfile string) (*keystore.Key, error)
- func SafeReadFile(file string) ([]byte, error)
- type WeightedString
- type WeightedStringSlice
- func (s WeightedStringSlice) Add(content string, weight uint64) WeightedStringSlice
- func (s WeightedStringSlice) GetStrings() (result []string)
- func (s WeightedStringSlice) Len() int
- func (s WeightedStringSlice) Less(i, j int) bool
- func (s WeightedStringSlice) Reverse()
- func (s WeightedStringSlice) Sort() WeightedStringSlice
- func (s WeightedStringSlice) String() (result string)
- func (s WeightedStringSlice) Swap(i, j int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadKeyStore ¶
LoadKeyStore load keystore from keyfile and passfile
func SafeReadFile ¶ added in v3.2.0
SafeReadFile check permissions is '0400' and read file
Types ¶
type WeightedString ¶
WeightedString weighted string
type WeightedStringSlice ¶
type WeightedStringSlice []*WeightedString
WeightedStringSlice weighted string slice
func (WeightedStringSlice) Add ¶
func (s WeightedStringSlice) Add(content string, weight uint64) WeightedStringSlice
Add add item
func (WeightedStringSlice) GetStrings ¶
func (s WeightedStringSlice) GetStrings() (result []string)
GetStrings get strings (commonly sort at first)
func (WeightedStringSlice) Less ¶
func (s WeightedStringSlice) Less(i, j int) bool
Less impl Sortable
func (WeightedStringSlice) Sort ¶
func (s WeightedStringSlice) Sort() WeightedStringSlice
Sort sort items
func (WeightedStringSlice) String ¶
func (s WeightedStringSlice) String() (result string)
Click to show internal directories.
Click to hide internal directories.