File Paths and Names in Go

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

Internal

Overview

path and filepath are two related packages that expose functionality to manipulating forward-slash-separated paths (the path package) and file names and filesystem paths that may include Windows-style backslashes and drive letters (the filepath package).

Packages

path

https://pkg.go.dev/path

filepath

https://pkg.go.dev/path/filepath

Assembling Paths

filepath.Join() The function also "cleans" the path.