mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2026-10-20 08:16:40 +00:00
18 lines
235 B
Go
18 lines
235 B
Go
package env
|
|
|
|
import "strings"
|
|
|
|
func WithBase(href string) string {
|
|
if BASE == "" {
|
|
return href
|
|
}
|
|
return BASE + href
|
|
}
|
|
|
|
func TrimBase(href string) string {
|
|
if BASE == "" {
|
|
return href
|
|
}
|
|
return strings.TrimPrefix(href, BASE)
|
|
}
|