utils

package
v0.0.0-...-77c908f Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFile

func CreateFile(dir string, force bool, name string, content []byte) error

CreateFile creates a file in the given directory with the given content. Use a truthy value for force to override an existing file.

func ReadFromFileOrStdin

func ReadFromFileOrStdin(filename string) ([]byte, error)

ReadFromFileOrStdin reads from a file or stdin if filename is "-"

func ReadInputOrFileOrStdin

func ReadInputOrFileOrStdin(input, filename string) ([]byte, error)

ReadInputOrFileOrStdin reads data from either a positional argument, a file, or stdin

func ReadPassword

func ReadPassword(passwordFile string) (string, error)

ReadPassword reads password from a file

Types

This section is empty.

Jump to

Keyboard shortcuts

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