- Join
Join parts of a directory or filepath
examples/join-filepath/join_filepath.go
package main import ( "fmt" "path/filepath" ) func main() { path := filepath.Join("main", "sub", "other") // main/sub/other main\sub\other fmt.Println(path) }
package main import ( "fmt" "path/filepath" ) func main() { path := filepath.Join("main", "sub", "other") // main/sub/other main\sub\other fmt.Println(path) }