* Module name changed to `github.com/rajch/weave` * Added environment variable `CHECKPOINT_DISABLE=1` to default manifests, to bypass weaveworks telemetry
22 lines
350 B
Go
22 lines
350 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
weavenet "github.com/rajch/weave/net"
|
|
)
|
|
|
|
func uniqueID(args []string) error {
|
|
if len(args) != 2 {
|
|
cmdUsage("unique-id", "<db-prefix> <host-root>")
|
|
}
|
|
dbPrefix := args[0]
|
|
hostRoot := args[1]
|
|
uid, err := weavenet.GetSystemPeerName(dbPrefix, hostRoot)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
fmt.Print(uid)
|
|
return nil
|
|
}
|