Guest User

Untitled

a guest
Dec 17th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4. "fmt"
  5. "path/filepath"
  6. )
  7.  
  8. func main() {
  9. // Output: /path/to/dir
  10. fmt.Println(filepath.Dir("/path//to/dir/file.ext"))
  11. }
  12.  
  13. // The `Parent` is what I want,
  14. // and this is a pseudo-code example, this won't actually work.
  15. //
  16. // Output: dir
  17. fmt.Println(filepath.Parent("/path//to/dir/file.ext"))
Add Comment
Please, Sign In to add comment