From c867d3a6957777387bad4b970c72c9b0b269e53b Mon Sep 17 00:00:00 2001 From: Maxim Lebedev Date: Mon, 18 Mar 2024 17:23:10 +0500 Subject: [PATCH] :memo: Added path example --- path/path_test.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 path/path_test.go diff --git a/path/path_test.go b/path/path_test.go new file mode 100644 index 0000000..5d18f58 --- /dev/null +++ b/path/path_test.go @@ -0,0 +1,13 @@ +package path_test + +import ( + "fmt" + + "source.toby3d.me/toby3d/hacks/path" +) + +func Example() { + head, tail := path.Shift("/foo/bar/index.html") + fmt.Println(head, tail) + // Output: foo /bar/index.html +}