Documentation: literals -> pointers
This commit is contained in:
parent
32552a358c
commit
d800b6f925
|
@ -1 +1,3 @@
|
|||
.idea
|
||||
*.swp
|
||||
*.save
|
||||
|
|
45
README.md
45
README.md
|
@ -1,20 +1,22 @@
|
|||
# common
|
||||
[![GoDoc](https://godoc.org/git.tcp.direct/kayos/common?status.svg)](https://pkg.go.dev/git.tcp.direct/kayos/common) [![codecov](https://codecov.io/gh/yunginnanet/common/branch/master/graph/badge.svg?token=vk5frSGqhq)](https://codecov.io/gh/yunginnanet/common)
|
||||
|
||||
|
||||
Welcome to things. Here are some of the aforementioned:
|
||||
|
||||
* [hash](./hash)
|
||||
* [hash](https://pkg.go.dev/git.tcp.direct/kayos/common/hash)
|
||||
|
||||
* [linux](./linux)
|
||||
* [linux](https://pkg.go.dev/git.tcp.direct/kayos/common/linux)
|
||||
|
||||
* [squish](./squish)
|
||||
* [squish](https://pkg.go.dev/git.tcp.direct/kayos/common/squish)
|
||||
|
||||
* [entropy](./entropy)
|
||||
* [entropy](https://pkg.go.dev/git.tcp.direct/kayos/common/entropy)
|
||||
|
||||
## base
|
||||
|
||||
`import "git.tcp.direct/kayos/common"`
|
||||
|
||||
### Usage
|
||||
## Base
|
||||
|
||||
#### func Abs
|
||||
|
||||
|
@ -29,36 +31,3 @@ Abs will give you the positive version of a negative integer, quickly.
|
|||
func Fprint(w io.Writer, s string)
|
||||
```
|
||||
Fprint is fmt.Fprint with error handling.
|
||||
|
||||
#### func OneInA
|
||||
|
||||
```go
|
||||
func OneInA(million int) bool
|
||||
```
|
||||
|
||||
#### func RNG
|
||||
|
||||
```go
|
||||
func RNG(n int) int
|
||||
```
|
||||
RNG is a Random Number Generator
|
||||
|
||||
#### func RandSleepMS
|
||||
|
||||
```go
|
||||
func RandSleepMS(n int)
|
||||
```
|
||||
RandSleepMS sleeps for a random period of time with a maximum of n milliseconds.
|
||||
|
||||
#### func RandStr
|
||||
|
||||
```go
|
||||
func RandStr(size int) string
|
||||
```
|
||||
RandStr generates a random alphanumeric string with a max length of size.
|
||||
|
||||
#### func RangeIterate
|
||||
|
||||
```go
|
||||
func RangeIterate(ips interface{}) chan *ipa.IP
|
||||
```
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
# entropy
|
||||
|
||||
`import "git.tcp.direct/kayos/common/entropy"`
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
#### func RNG
|
||||
|
||||
```go
|
||||
func RNG(n int) int
|
||||
```
|
||||
|
||||
#### func RandomStrChoice
|
||||
|
||||
```go
|
||||
func RandomStrChoice(choice []string) string
|
||||
```
|
|
@ -1,22 +0,0 @@
|
|||
# hash
|
||||
|
||||
`import "git.tcp.direct/kayos/common/hash"`
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
#### func Blake2bSum
|
||||
|
||||
```go
|
||||
func Blake2bSum(b []byte) []byte
|
||||
```
|
||||
Blake2bSum ignores all errors and gives you a blakae2b 64 hash value as a byte
|
||||
slice. (or panics somehow)
|
||||
|
||||
#### func BlakeEqual
|
||||
|
||||
```go
|
||||
func BlakeEqual(a []byte, b []byte) bool
|
||||
```
|
||||
BlakeEqual will take in two byte slices, hash them with blake2b, and tell you if
|
||||
the resulting checksums match.
|
|
@ -1,30 +0,0 @@
|
|||
## linux
|
||||
|
||||
import "git.tcp.direct/kayos/common/linux"
|
||||
|
||||
### Usage
|
||||
|
||||
```go
|
||||
const (
|
||||
// UnameOS is "sysname" or "uname -s".
|
||||
UnameOS
|
||||
// UnameArch is "machine" or "uname -m".
|
||||
UnameArch
|
||||
// UnameRelease is "release" or "uname -r".
|
||||
UnameRelease
|
||||
// UnameDomain is "domainname", the kernel domain name.
|
||||
UnameDomain
|
||||
// UnameVersion is "version", or "uname -v".
|
||||
UnameVersion
|
||||
// UnameHostname is "Nodename" or "uname -n"
|
||||
UnameHostname
|
||||
)
|
||||
```
|
||||
|
||||
#### func GetUname
|
||||
|
||||
```go
|
||||
func GetUname(unameFlags string) (un string, err error)
|
||||
```
|
||||
GetUname uses system calls to retrieve the same values as the uname linux
|
||||
command
|
|
@ -1,43 +0,0 @@
|
|||
# squish
|
||||
|
||||
`import "git.tcp.direct/kayos/common/squish"`
|
||||
|
||||
## Usage
|
||||
|
||||
#### func B64d
|
||||
|
||||
```go
|
||||
func B64d(str string) (data []byte)
|
||||
```
|
||||
B64d decodes the given string into the original slice of bytes. Do note that
|
||||
this is for non critical tasks, it has no error handling for purposes of clean
|
||||
code.
|
||||
|
||||
#### func B64e
|
||||
|
||||
```go
|
||||
func B64e(cytes []byte) (data string)
|
||||
```
|
||||
B64e encodes the given slice of bytes into base64 standard encoding.
|
||||
|
||||
#### func Gunzip
|
||||
|
||||
```go
|
||||
func Gunzip(data []byte) ([]byte, error)
|
||||
```
|
||||
Gunzip decompresses a gzip compressed slice of bytes.
|
||||
|
||||
#### func Gzip
|
||||
|
||||
```go
|
||||
func Gzip(data []byte) ([]byte, error)
|
||||
```
|
||||
Gzip compresses as slice of bytes using gzip compression.
|
||||
|
||||
#### func UnpackStr
|
||||
|
||||
```go
|
||||
func UnpackStr(encoded string) string
|
||||
```
|
||||
UnpackStr UNsafely unpacks (usually banners) that have been base64'd and then
|
||||
gzip'd.
|
Loading…
Reference in New Issue