uuid.go 375 B

123456789101112131415161718192021
  1. package all
  2. import (
  3. "fmt"
  4. "github.com/v2fly/v2ray-core/v4/common/uuid"
  5. "github.com/v2fly/v2ray-core/v4/main/commands/base"
  6. )
  7. var cmdUUID = &base.Command{
  8. UsageLine: "{{.Exec}} uuid",
  9. Short: "Generate new UUIDs",
  10. Long: `Generate new UUIDs.
  11. `,
  12. Run: executeUUID,
  13. }
  14. func executeUUID(cmd *base.Command, args []string) {
  15. u := uuid.New()
  16. fmt.Println(u.String())
  17. }