blob: 328d5383729cb0d0d4813e0f9db351a472615926 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package sqlite
import (
"strings"
)
func pathNameToFileName(pathname string) string {
if strings.HasSuffix(pathname, "/") {
pathname = pathname + "index.html"
}
return pathname
}
func fileNameToPathName(filename string) string {
pathname := strings.TrimSuffix(filename, "index.html")
pathname = strings.TrimPrefix(pathname, "/")
return "/" + pathname
}
|