transcode

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeBytes

func EncodeBytes(path string) []byte

EncodeBytes 将路径编码成[]byte json

func Load

func Load(file string, path ...string)

Load 从文件中加载并解码到指定目录

func LoadForBytes

func LoadForBytes(bytes []byte, path ...string)

LoadForBytes 从bytes中加载并解码到指定目录

func Save

func Save(path string, save ...string)

Save 将路径文件(夹)编码并保存到指定文件

Types

type TFData

type TFData struct {
	Name string
	Val  []byte
	// 是否是文件夹
	IsDir bool
	// 如果是文件夹则内
	DirVal []TFData
}

TFData 传输文件结构体

func DecodeBytes

func DecodeBytes(bytes []byte) TFData

DecodeBytes 对bytes进行解码

func DecodePath

func DecodePath(path string) TFData

DecodePath 从指定目录加载并解码

func NewTfJson

func NewTfJson() TFData

NewTfJson 实例化

Jump to

Keyboard shortcuts

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