Skip to content
Node: path.join(...)github.com/sahilkhaire/gox/path

Join

Overview ​

Join joins path segments (path.join).

If you are coming from Node.js, the closest pattern is path.join(...).

Signature ​

go
func Join(elem ...string) string

Compare: Node.js · Standard Go · gox ​

js
path.join('a', 'b', 'c');
go
filepath.Join("a", "b", "c")
go
import "github.com/sahilkhaire/gox/path"

p := path.Join("a", "b", "c")

Example ​

go
import "github.com/sahilkhaire/gox/path"

p := path.Join("a", "b", "c")

Tips ​

Uses OS-specific separators via filepath underneath.

Standard library alternative ​

Use the standard library directly:

go
filepath.Join("a", "b", "c")

← Back to path package overview

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