mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2024-12-03 09:20:24 +01:00
cb6e5cb0c7
* use dep for vendoring * lets encrypt * moved web to transfer.sh-web repo * single command install * added first tests
33 lines
522 B
Go
33 lines
522 B
Go
package uuid_test
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/nu7hatch/gouuid"
|
|
)
|
|
|
|
func ExampleNewV4() {
|
|
u4, err := uuid.NewV4()
|
|
if err != nil {
|
|
fmt.Println("error:", err)
|
|
return
|
|
}
|
|
fmt.Println(u4)
|
|
}
|
|
|
|
func ExampleNewV5() {
|
|
u5, err := uuid.NewV5(uuid.NamespaceURL, []byte("nu7hat.ch"))
|
|
if err != nil {
|
|
fmt.Println("error:", err)
|
|
return
|
|
}
|
|
fmt.Println(u5)
|
|
}
|
|
|
|
func ExampleParseHex() {
|
|
u, err := uuid.ParseHex("6ba7b810-9dad-11d1-80b4-00c04fd430c8")
|
|
if err != nil {
|
|
fmt.Println("error:", err)
|
|
return
|
|
}
|
|
fmt.Println(u)
|
|
}
|