package
0.0.0-20190407150747-8b9b72514244
Repository: https://github.com/ipsn/go-ipfs.git
Documentation: pkg.go.dev
# README
go-path
go-path is a helper package that provides utilities for parsing and using ipfs paths
Table of Contents
TODO
This package could probably be merged into go-ipld, or something along those lines. It doesnt really make sense as its own standalone thing.
Contribute
PRs are welcome!
Small note: If editing the Readme, please conform to the standard-readme specification.
License
MIT © Juan Batiz-Benet
# Packages
Package resolver implements utilities for resolving paths within ipfs.
# Functions
FromCid safely converts a cid.Cid type to a Path type.
FromSegments returns a path given its different segments.
FromString safely converts a string type to a Path type.
Join joins strings slices using /.
ParseCidToPath takes a CID in string form and returns a valid ipfs Path.
ParsePath returns a well-formed ipfs Path.
SplitAbsPath clean up and split fpath.
SplitList splits strings usings /.
# Variables
ErrBadPath is returned when a given path is incorrectly formatted.
ErrNoComponents is used when Paths after a protocol do not contain at least one component.
# Type aliases
A Path represents an ipfs content path: * /<cid>/path/to/file * /ipfs/<cid> * /ipns/<cid>/path/to/folder * etc.