mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
f2614f2107
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
21 lines
274 B
Go
21 lines
274 B
Go
package ansiterm
|
|
|
|
import (
|
|
"strconv"
|
|
)
|
|
|
|
func sliceContains(bytes []byte, b byte) bool {
|
|
for _, v := range bytes {
|
|
if v == b {
|
|
return true
|
|
}
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
func convertBytesToInteger(bytes []byte) int {
|
|
s := string(bytes)
|
|
i, _ := strconv.Atoi(s)
|
|
return i
|
|
}
|