(prefix string)
| 237 | } |
| 238 | |
| 239 | func pickName(prefix string) (s string) { |
| 240 | const chars = "abcdefghijklmnopqrstuvwxyz" |
| 241 | for i := 0; i < 10; i++ { |
| 242 | s += string(chars[random.Intn(len(chars))]) |
| 243 | } |
| 244 | return formatPrefix(prefix, time.Now()) + s |
| 245 | } |
| 246 | |
| 247 | func formatPrefix(prefix string, t time.Time) string { |
| 248 | return "pgtest_" + prefix + "_" + t.UTC().Format(timeFormat) + "Z_" |
no test coverage detected