witcli

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindOrCreateDir added in v0.3.1

func FindOrCreateDir(path string) (fs.FileInfo, error)

FindOrCreateDir attempts to load file information for the provided path and the provided path does not already exist, it attempts to create the directory and then return the file information for it.

func LoadPath added in v0.2.3

func LoadPath(paths ...string) (string, error)

LoadPath parses paths and returns the first path. If paths is empty, returns "-". If paths has more than one element, returns an error.

func LoadWIT added in v0.2.3

func LoadWIT(ctx context.Context, forceWIT bool, path string) (*wit.Resolve, error)

LoadWIT loads a single wit.Resolve. If path is a OCI path, it pulls from the OCI registry and load WIT from the buffer. If path == "" or "-", then it reads from stdin. If the resolved path doesn’t end in ".json", it will attempt to load WIT indirectly by processing the input through wasm-tools. If forceWIT is true, it will always process input through wasm-tools.

func Logger added in v0.3.1

func Logger(verbose, debug bool) logging.Logger

Logger returns a logging.Logger that outputs to stdout.

func Version added in v0.3.1

func Version() string

Version returns the version string of this module.

Types

This section is empty.

Jump to

Keyboard shortcuts

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