Commit ee6c3922 authored by zauberstuhl's avatar zauberstuhl

Remove obsolete uuid helper

parent 35eee2d1
......@@ -21,7 +21,7 @@ import (
"github.com/revel/revel"
"gopkg.in/ganggo/ganggo.v0/app/models"
"gopkg.in/ganggo/ganggo.v0/app/jobs"
"gopkg.in/ganggo/api.v0/app/helpers"
"gopkg.in/ganggo/ganggo.v0/app/helpers"
federation "gopkg.in/ganggo/federation.v0"
)
......
......@@ -23,7 +23,7 @@ import (
"regexp"
"errors"
"strconv"
"gopkg.in/ganggo/api.v0/app/helpers"
"gopkg.in/ganggo/ganggo.v0/app/helpers"
"gopkg.in/ganggo/ganggo.v0/app/models"
"gopkg.in/ganggo/ganggo.v0/app/jobs"
federation "gopkg.in/ganggo/federation.v0"
......
package helpers
//
// GangGo API Library
// Copyright (C) 2017 Lukas Matt <lukas@zauberstuhl.de>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
import (
"fmt"
"crypto/rand"
)
func Uuid() (uuid string, err error) {
b := make([]byte, 16)
_, err = rand.Read(b)
if err != nil {
return
}
uuid = fmt.Sprintf("%x%x%x%x%x", b[0:4], b[4:6], b[6:8], b[8:10], b[10:])
return
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment