shared

package
v0.0.0-...-951143b Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: Apache-2.0, MIT, Apache-2.0, + 1 more Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseDataSourceArg

func ParseDataSourceArg(inputArg string) (reader *bufio.Reader, link datamodel.Link, err error)

ParseDataSourceArg returns a reader for data based on the argument, and a Link if the argument was of that kind.

Errors:

  • ipldtool-error-invalid-args -- if the input arg can't be made into a readable stream.

func ParseEncoderArg

func ParseEncoderArg(arg string, defalt string, argName string) (codec.Encoder, error)

ParseDataSourceArg returns an IPLD encoder based on the argument string. It handles strings of the form "codec:{name}", "codec:0x{code}", and the special string "debug".

The argName parameter is used purely for error message formatting purposes.

Errors:

  • ipldtool-error-invalid-args -- if the input arg can't be made into a readable stream.

func StringIsPathish

func StringIsPathish(x string) bool

StringIsPathish returns true if the string explicitly looks like a filesystem path (starts with `./`, `../`, or `/`).

Types

This section is empty.

Jump to

Keyboard shortcuts

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