MCPcopy Create free account
hub / github.com/AdRoll/baker / formatToLayout

Function formatToLayout

filter/format_time.go:125–150  ·  view source on GitHub ↗
(format string)

Source from the content-addressed store, hash-verified

123}
124
125func formatToLayout(format string) string {
126 switch format {
127 case ansic:
128 return time.ANSIC
129 case unixdate:
130 return time.UnixDate
131 case rubydate:
132 return time.RubyDate
133 case rfc822:
134 return time.RFC822
135 case rfc822z:
136 return time.RFC822Z
137 case rfc850:
138 return time.RFC850
139 case rfc1123:
140 return time.RFC1123
141 case rfc1123z:
142 return time.RFC1123Z
143 case rfc3339:
144 return time.RFC3339
145 case rfc3339nano:
146 return time.RFC3339Nano
147 default:
148 return format
149 }
150}
151
152func genParseFun(format string) func(b []byte) (time.Time, error) {
153 switch format {

Callers 2

genParseFunFunction · 0.85
genFormatFunFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected