This commit is contained in:
alessio 2017-08-27 14:39:37 +02:00
parent 2427562245
commit 1e2534a048
2 changed files with 2 additions and 1 deletions

View File

@ -20,7 +20,7 @@ func init() {
} }
} }
// Open a url in the default browser // OpenURL is used for open an url in the default browser
func (s *Server) OpenURL(url string) (io.Writer, error) { func (s *Server) OpenURL(url string) (io.Writer, error) {
if s.Open { if s.Open {
open, err := cmd[runtime.GOOS] open, err := cmd[runtime.GOOS]

View File

@ -57,6 +57,7 @@ func (s Settings) Path(path string) string {
return strings.Replace(filepath.Clean(path), "\\", "/", -1) return strings.Replace(filepath.Clean(path), "\\", "/", -1)
} }
// Rand is used for generate a random string
func Rand(n int) string { func Rand(n int) string {
src := rand.NewSource(time.Now().UnixNano()) src := rand.NewSource(time.Now().UnixNano())
b := make([]byte, n) b := make([]byte, n)