2022-01-01 21:39:27 +00:00
|
|
|
# common
|
2022-03-12 04:55:24 +00:00
|
|
|
[![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)
|
|
|
|
|
2022-01-01 21:39:27 +00:00
|
|
|
|
2022-02-08 12:21:57 +00:00
|
|
|
Welcome to things. Here are some of the aforementioned:
|
2022-01-01 21:39:27 +00:00
|
|
|
|
2022-03-12 04:55:24 +00:00
|
|
|
* [hash](https://pkg.go.dev/git.tcp.direct/kayos/common/hash)
|
2022-01-01 21:39:27 +00:00
|
|
|
|
2022-03-12 04:55:24 +00:00
|
|
|
* [linux](https://pkg.go.dev/git.tcp.direct/kayos/common/linux)
|
2022-01-01 22:01:21 +00:00
|
|
|
|
2022-03-12 04:55:24 +00:00
|
|
|
* [squish](https://pkg.go.dev/git.tcp.direct/kayos/common/squish)
|
2022-01-01 22:01:21 +00:00
|
|
|
|
2022-03-12 04:55:24 +00:00
|
|
|
* [entropy](https://pkg.go.dev/git.tcp.direct/kayos/common/entropy)
|
2022-02-08 12:21:57 +00:00
|
|
|
|
2022-05-30 05:36:31 +00:00
|
|
|
* [network](https://pkg.go.dev/git.tcp.direct/kayos/common/network)
|
|
|
|
|
2022-02-08 12:21:57 +00:00
|
|
|
## base
|
|
|
|
|
2022-05-30 05:36:31 +00:00
|
|
|
`import "git.tcp.direct/kayos/common"`
|
2022-01-01 21:39:27 +00:00
|
|
|
|
2022-05-30 05:36:31 +00:00
|
|
|
## Base Module
|
2022-02-08 12:21:57 +00:00
|
|
|
|
|
|
|
#### func Abs
|
2022-01-01 21:39:27 +00:00
|
|
|
|
|
|
|
```go
|
2022-02-08 12:21:57 +00:00
|
|
|
func Abs(n int) int
|
2022-01-01 21:39:27 +00:00
|
|
|
```
|
2022-02-08 12:21:57 +00:00
|
|
|
Abs will give you the positive version of a negative integer, quickly.
|
2022-01-01 21:39:27 +00:00
|
|
|
|
2022-05-30 05:36:31 +00:00
|
|
|
#### func BytesToFloat64
|
|
|
|
|
|
|
|
```go
|
|
|
|
func BytesToFloat64(bytes []byte) float64
|
|
|
|
```
|
|
|
|
BytesToFloat64 will take a slice of bytes and convert it to a float64 type.
|
|
|
|
|
|
|
|
#### func Float64ToBytes
|
|
|
|
|
|
|
|
```go
|
|
|
|
func Float64ToBytes(f float64) []byte
|
|
|
|
```
|
|
|
|
Float64ToBytes will take a float64 type and convert it to a slice of bytes.
|
|
|
|
|
2022-01-01 21:39:27 +00:00
|
|
|
#### func Fprint
|
|
|
|
|
|
|
|
```go
|
|
|
|
func Fprint(w io.Writer, s string)
|
|
|
|
```
|
|
|
|
Fprint is fmt.Fprint with error handling.
|