This repository has been archived by the owner on Aug 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
header.go
73 lines (68 loc) · 1.57 KB
/
header.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// Copyright 2017 Tom Thorogood. All rights reserved.
// Use of this source code is governed by a Modified
// BSD License that can be found in the LICENSE file.
package bindata
import (
"path/filepath"
"strings"
"text/template"
"unicode"
)
func init() {
template.Must(baseTemplate.New("header").Funcs(template.FuncMap{
"trimright": func(s string) string {
return strings.TrimRightFunc(s, unicode.IsSpace)
},
"toslash": filepath.ToSlash,
}).Parse(`{{- /* This makes e.g. Github ignore diffs in generated files. */ -}}
// Code generated by go-bindata. DO NOT EDIT.
{{if $.Dev -}}
// debug: dev
{{else if $.Debug -}}
// debug: true
{{end -}}
{{- if $.MemCopy -}}
// memcopy: true
{{end -}}
{{- if $.Compress -}}
// compress: true
{{end -}}
{{- if and $.Compress $.DecompressOnce -}}
// decompress: once
{{end -}}
{{- if $.Metadata -}}
// metadata: true
{{end -}}
{{- if $.Mode -}}
// mode: {{printf "%04o" $.Mode}}
{{end -}}
{{- if $.ModTime -}}
// modtime: {{$.ModTime}}
{{end -}}
{{- if $.AssetDir -}}
// asset-dir: true
{{end -}}
{{- if $.Restore -}}
// restore: true
{{end -}}
{{- if $.Hash -}}
{{- if $.HashFormat -}}
// hash-format: {{$.HashFormat}}
{{else -}}
// hash-format: unchanged
{{end -}}
{{- if and $.HashFormat $.HashLength (ne $.HashLength 16) -}}
// hash-length: {{$.HashLength}}
{{end -}}
{{- if and $.HashFormat $.HashEncoding -}}
// hash-encoding: {{$.HashEncoding}}
{{end -}}
{{- end -}}
// sources:
{{range .Assets -}}
// {{toslash (trimright .Path)}}
{{end}}
{{if $.Tags -}} // +build {{$.Tags}}
{{end -}}
package {{$.Package}}`))
}