Source File
trustedsource.go
Belonging Package
github.com/google/safehtml/template
package template
import (
)
func ( stringConstant) TrustedSource {
return TrustedSource{string()}
}
func ( stringConstant, TrustedSource, string) (TrustedSource, error) {
if := strings.IndexAny(, string([]rune{filepath.Separator, filepath.ListSeparator})); != -1 {
return TrustedSource{}, fmt.Errorf("filename %q must not contain the separator %q", , [])
}
if == ".." {
return TrustedSource{}, fmt.Errorf("filename must not be the special name %q", )
}
return TrustedSource{filepath.Join(string(), .String(), )}, nil
}
func ( ...TrustedSource) TrustedSource {
return TrustedSource{filepath.Join(trustedSourcesToStrings()...)}
}
func ( flag.Value) TrustedSource {
return TrustedSource{fmt.Sprint(.String())}
}
func ( stringConstant) TrustedSource {
return TrustedSource{os.Getenv(string())}
}
func ( TrustedSource) () string {
return .src
}
func ( []TrustedSource) []string {
:= make([]string, 0, len())
for , := range {
= append(, .String())
}
return
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |