Go 하이픈 없는 UUID 생성

1 개요[ | ]

Go 하이픈 없는 UUID 생성
package main

import (
	"fmt"
	"strings"

	"github.com/google/uuid"
)

func main() {
	noHyphenUUID := strings.Replace(uuid.New().String(), "-", "", -1)
	fmt.Println(noHyphenUUID)      // 4a238145afa446d797d7944f2d645d1b
	fmt.Println(len(noHyphenUUID)) // 32
}

2 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}