Path parsing library, for Go
libpath is a multi-platform path parsing library. The first libpath library was a C library with a C++ wrapper. There have been several implementations in other languages. libpath.Go is the Go version.
Install via go get, as in:
go get "github.com/synesissoftware/libpath.Go"and then import as:
import libpath "github.com/synesissoftware/libpath.Go"or, simply, as:
import"github.com/synesissoftware/libpath.Go"The library is organised into platform-specific parsing packages and shared types:
parse/unix—ClassifyRoot(),ParsePathStringFlags()for Unix path strings;parse/windows—ClassifyRoot(),ParsePathStringFlags()for Windows path strings;parse/common— sharedPathDescriptor,ParseFlags, and related types.
See EXAMPLES.md and examples/parse_path.md for parsing under ambient, Unix, and Windows interpretation.
Examples are provided in the examples directory, along with a markdown description for each. A detailed list TOC of them is provided in EXAMPLES.md.
Defect reports, feature requests, and pull requests are welcome on https://github.com/synesissoftware/libpath.Go.
Other libpath libraries include:
Projects in which libpath.Go is used include:
libpath.Go is used in the recls.Go library.
libpath.Go is released under the 3-clause BSD license. See LICENSE for details.