Skip to content
Node: path6 APIs

path

Package path provides Node path module helpers using path/filepath.

import "github.com/sahilkhaire/gox/path"
## API reference

Select a symbol below — each page explains what it does, shows Node.js vs Go comparisons, and includes a runnable example.

Functions

SymbolNode.jsKindSummary
Basenamepath.basename(p)funcBasename returns the last element (path.basename).
Dirnamepath.dirname(p)funcDirname returns the directory (path.dirname).
Extnamepath.extname(p)funcExtname returns the extension including dot (path.extname).
IsAbspath.isAbsolute(p)funcIsAbs reports whether p is absolute (path.isAbsolute).
Joinpath.join(...)funcJoin joins path segments (path.join).
Resolvepath.resolve(...)funcResolve resolves to an absolute path (path.resolve).

MIT Licensed · Built for Node.js developers moving to Go