file

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2021 License: MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package file file related operations

Index

Constants

This section is empty.

Variables

View Source
var (
	JSONTimeRFC3399Layout = "2006-01-02T15:04:05.999999999Z0700"
)

Functions

func JSONFileToBytes added in v1.1.4

func JSONFileToBytes(pathFile string) ([]byte, error)

func JSONFileToMap added in v1.1.4

func JSONFileToMap(pathFile string) (map[string]interface{}, error)

func JSONGenericMapToBytes

func JSONGenericMapToBytes(input map[string]interface{}) ([]byte, error)

func JSONMerge

func JSONMerge(input [][]byte) ([]byte, error)

func JSONPrettify

func JSONPrettify(input []byte) (*bytes.Buffer, error)

func JSONPrettifyNoError

func JSONPrettifyNoError(input []byte) *bytes.Buffer

func JSONWriteInterface

func JSONWriteInterface(options *JSONWriteInterfaceOptions) ([]byte, error)

func TOMLBytesToJSON

func TOMLBytesToJSON(input []byte) ([]byte, error)

func TOMLBytesToMergedJSON

func TOMLBytesToMergedJSON(bytesSlices [][]byte) ([]byte, error)

func TOMLFileReaderCallbackToJSON added in v1.1.3

func TOMLFileReaderCallbackToJSON(getFileCallback func() (fs.File, error)) ([]byte, error)

func TOMLFileReaderToJSON added in v1.1.3

func TOMLFileReaderToJSON(input fs.File, doClose bool) ([]byte, error)

func TOMLFileToJSON

func TOMLFileToJSON(input string) ([]byte, error)

func TOMLFilesToMergedJSON

func TOMLFilesToMergedJSON(pathFiles []string) ([]byte, error)

func TOMLReaderToJSON

func TOMLReaderToJSON(input io.Reader) ([]byte, error)

func TOMLStringToJSON

func TOMLStringToJSON(input string) ([]byte, error)

func WriteFile

func WriteFile(options *WriteFileOptions) error

Types

type JSONTimeRFC3399

type JSONTimeRFC3399 struct {
	time.Time
}

usage: `json:"time"`

func (*JSONTimeRFC3399) IsSet

func (ct *JSONTimeRFC3399) IsSet() bool

func (*JSONTimeRFC3399) MarshalJSON

func (self *JSONTimeRFC3399) MarshalJSON() ([]byte, error)

func (*JSONTimeRFC3399) UnmarshalJSON

func (self *JSONTimeRFC3399) UnmarshalJSON(b []byte) (err error)

type JSONWriteInterfaceOptions

type JSONWriteInterfaceOptions struct {
	Input    interface{}
	PathFile string
	Pretty   bool
}

type WriteFileOptions

type WriteFileOptions struct {
	PathFile      string
	ContentsBytes []byte
}

Jump to

Keyboard shortcuts

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