node

package
v0.0.0-...-de12d8f Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2021 License: GPL-3.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFile

func CreateFile(fullPath string) (*os.File, error)

func FSJoin

func FSJoin(folders ...string) (res string)

func FSJoinSlice

func FSJoinSlice(folders []string) (res string)

func FileExists

func FileExists(path string) bool

func IsFullPath

func IsFullPath(path string) bool

func Key2Slice

func Key2Slice(k interface{}) (b []byte)

func Key2String

func Key2String(k interface{}) (s string)

func PubFromPriv

func PubFromPriv(priv ed25519.PrivateKey) (pub ed25519.PublicKey)

func SafeFileRead

func SafeFileRead(path string) (data []byte, err error)

func SafeFileWrite

func SafeFileWrite(path string, data []byte) (err error)

func Slice2PrivKey

func Slice2PrivKey(s []byte) (pk ed25519.PrivateKey)

func Slice2PubKey

func Slice2PubKey(s []byte) (pk ed25519.PublicKey)

func String2CID

func String2CID(key string) (c cid.Cid, err error)

func String2PrivKey

func String2PrivKey(s string) (pk *ed25519.PrivateKey)

func String2PubKey

func String2PubKey(s string) (pk ed25519.PublicKey)

func TouchFile

func TouchFile(absPath string) (err error)

func Trim

func Trim(s string) (ret string)

trims byte(0), byte(0xa) byte(0x20)

func TryLock

func TryLock(lf lockfile.Lockfile) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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