cmdutil

package
v1.0.0-beta10 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFileOrStdin

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

ReadFileOrStdin reads a file or reads stdin

func ReadGraph

func ReadGraph(gfile []string, interner ls.Interner, inputFormat string) (graph.Graph, error)

func ReadJSON

func ReadJSON(input string, output interface{}, enc ...encoding.Encoding) error

ReadJSON reads JSON from a file or a URL

func ReadJSONFileOrStdin

func ReadJSONFileOrStdin(input []string, output interface{}, enc ...encoding.Encoding) error

ReadJSONFileOrStdin reads a JSON file(s), or if there are none, reads from stdin

func ReadJSONGraph

func ReadJSONGraph(gfile []string, interner ls.Interner) (graph.Graph, error)

func ReadJSONLDGraph

func ReadJSONLDGraph(gfile []string, interner ls.Interner) (graph.Graph, error)

func ReadJSONMultiple

func ReadJSONMultiple(input []string) ([]interface{}, error)

ReadJSONMultiple reads multiple JSON files

func ReadJSONOrYAML

func ReadJSONOrYAML(input string, output interface{}, enc ...encoding.Encoding) error

func ReadURL

func ReadURL(input string, enc ...encoding.Encoding) ([]byte, error)

ReadURL reads a file or a URL

func StreamFileOrStdin

func StreamFileOrStdin(input []string, enc ...encoding.Encoding) (io.Reader, error)

StreamFileOrStdin reads file(s), or if there are none, reads frm stdin

func WriteGraph

func WriteGraph(graph graph.Graph, format string, out io.Writer) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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