vaz_lib 0.2.2

vaz_lib is a small library made for those who just don't want to fuddle with complex stuff.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package cmdutil

import (
	"io"
	"os"
)

func ReadFile(filename string, stdin io.ReadCloser) ([]byte, error) {
	if filename == "-" {
		b, err := io.ReadAll(stdin)
		_ = stdin.Close()
		return b, err
	}

	return os.ReadFile(filename)
}