(size int)
| 662 | } |
| 663 | |
| 664 | func randomToken(size int) string { |
| 665 | buf := make([]byte, size) |
| 666 | if _, err := rand.Read(buf); err != nil { |
| 667 | return fmt.Sprintf("pulse-secret-%d", time.Now().UnixNano()) |
| 668 | } |
| 669 | return fmt.Sprintf("%x", buf) |
| 670 | } |
| 671 | |
| 672 | func supportedProtocol(value string) bool { |
| 673 | switch value { |
no test coverage detected