io

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteStreamFileUpload added in v0.2.7

func ByteStreamFileUpload(remoteURL, remoteFolder, filename string, datastream io.Reader) (string, error)

ByteStreamFileUpload uploads file with given byte stream CREDIT: https://gist.github.com/ebraminio/576fdfdff425bf3335b51a191a65dbdb

func DoesPathExists

func DoesPathExists(path string) bool

DoesPathExists checks for existence of file

func FormDataFileUpload added in v0.2.7

func FormDataFileUpload(remoteURL string, filepath string) error

FormDataFileUpload upload file using html file upload

func MustOpen added in v0.2.7

func MustOpen(f string) (*os.File, error)

MustOpen ensures file can be opened

func ReadFileToBytes added in v0.1.15

func ReadFileToBytes(path string) ([]byte, error)

ReadFileToBytes reads files and returns the content as bytes

func RenderTemplate

func RenderTemplate(tpl string, data interface{}) (string, error)

RenderTemplate renders template

func WriteBytesToFile

func WriteBytesToFile(bytes []byte, path string) error

WriteBytesToFile writes given bytes to file

func WriteStringTofile

func WriteStringTofile(s string, path string) error

WriteStringTofile writes given string to file

func WriteTemplate

func WriteTemplate(tpl string, data interface{}, path string) error

WriteTemplate executes go template and writes the content to file

Types

This section is empty.

Jump to

Keyboard shortcuts

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