diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-04-28 23:37:02 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-04-28 23:37:02 +0300 |
commit | 525b9a33476e97f5a2a006cb4e4ff7959722d467 (patch) | |
tree | 9e90a2dc32c008ecfa50155ffd4ecbcba0a16f8f /helpers.go | |
parent | b0ac2a7d3f7c48702120de4910cde34b7aee7bdd (diff) |
Add helper for checking if path ends with Slash
Diffstat (limited to 'helpers.go')
-rw-r--r-- | helpers.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -4,6 +4,7 @@ import ( "io/ioutil" "log" "net" + "strings" ) func readFile(file string) (result []byte) { @@ -28,3 +29,7 @@ func createSocket(addr string) (l net.Listener, fd uintptr) { fd = f.Fd() return } + +func endsWithSlash(path string) bool { + return strings.HasSuffix(path, "/") +} |