File: path_test.go

package info (click to toggle)
golang-github-anacrolix-missinggo 2.1.0-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 836 kB
  • sloc: makefile: 4
file content (17 lines) | stat: -rw-r--r-- 359 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package missinggo

import (
	"fmt"
)

func ExamplePathSplitExt() {
	fmt.Printf("%q\n", PathSplitExt(".cshrc"))
	fmt.Printf("%q\n", PathSplitExt("dir/a.ext"))
	fmt.Printf("%q\n", PathSplitExt("dir/.rc"))
	fmt.Printf("%q\n", PathSplitExt("home/.secret/file"))
	// Output:
	// {"" ".cshrc"}
	// {"dir/a" ".ext"}
	// {"dir/" ".rc"}
	// {"home/.secret/file" ""}
}