You've already forked go-url-shortener
Update
This commit is contained in:
@@ -10,3 +10,7 @@ import (
|
||||
func CsrfField(r *http.Request) template.HTML {
|
||||
return csrf.TemplateField(r)
|
||||
}
|
||||
|
||||
func CsrfToken(r *http.Request) string {
|
||||
return csrf.Token(r)
|
||||
}
|
||||
|
||||
@@ -2,6 +2,22 @@ package util
|
||||
|
||||
import "strings"
|
||||
|
||||
func GetResourcesFile(path ...string) ([]string, []string) {
|
||||
var csses []string
|
||||
var jses []string
|
||||
if len(path) > 0 {
|
||||
for _, p := range path {
|
||||
if strings.HasSuffix(p, ".css") {
|
||||
csses = append(csses, p)
|
||||
} else if strings.HasSuffix(p, ".js") {
|
||||
jses = append(jses, p)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return csses, jses
|
||||
}
|
||||
|
||||
func GetCssFile(path ...string) []string {
|
||||
var res []string
|
||||
if len(path) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user