mirror of https://github.com/v2ray/v2ray-core
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
483 B
32 lines
483 B
package control
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"v2ray.com/core/common"
|
|
"v2ray.com/core/common/uuid"
|
|
)
|
|
|
|
type UUIDCommand struct{}
|
|
|
|
func (c *UUIDCommand) Name() string {
|
|
return "uuid"
|
|
}
|
|
|
|
func (c *UUIDCommand) Description() Description {
|
|
return Description{
|
|
Short: "Generate new UUIDs",
|
|
Usage: []string{"v2ctl uuid"},
|
|
}
|
|
}
|
|
|
|
func (c *UUIDCommand) Execute([]string) error {
|
|
u := uuid.New()
|
|
fmt.Println(u.String())
|
|
return nil
|
|
}
|
|
|
|
func init() {
|
|
common.Must(RegisterCommand(&UUIDCommand{}))
|
|
}
|