utils

package
v0.0.0-...-76a9b92 Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IMAGE_PATH = path.Join("data", "images")
	VOICE_PATH = path.Join("data", "voices")
	VIDEO_PATH = path.Join("data", "videos")
	CACHE_PATH = path.Join("data", "cache")

	HEADER_AMR  = []byte("#!AMR")
	HEADER_SILK = []byte("\x02#!SILK_V3")
)

Functions

func Check

func Check(err error)

func EnsureBool

func EnsureBool(p interface{}, defaultVal bool) bool

func GetBytes

func GetBytes(url string) ([]byte, error)

func InArrayString

func InArrayString(target string, str_array []string) bool

func InArryInt

func InArryInt(target int, int64_array []int) bool

func IsAMRorSILK

func IsAMRorSILK(b []byte) bool

func PathExists

func PathExists(path string) bool

func ReadAllText

func ReadAllText(path string) string

func WriteAllText

func WriteAllText(path, text string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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