ioutil

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: MIT Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsGzip

func IsGzip(path string) bool

IsGzip determines if a path points to a gzip compressed file. Returns true when the file has a .gz extension.

func OpenCompressed

func OpenCompressed(file string, flag int, perm os.FileMode) (io.WriteCloser, error)

OpenCompressed opens a file for writing and automatically compresses the content if the filename ends with .gz

func OpenDecompressed

func OpenDecompressed(path string) (io.ReadCloser, error)

OpenDecompressed opens a reader for the specified file and automatically gzip decompresses the content if the filename ends with .gz

func WriteCompressedJson

func WriteCompressedJson(file string, obj any) error

WriteCompressedJson writes the object to the specified file as a compressed json object if the filename ends with .gz.

Types

This section is empty.

Jump to

Keyboard shortcuts

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