Generating unique file name using UUID in golang
问题 I need to generate an unique file name with UUID1. My current python code is: uuid.uuid1().hex[:16] // i need 16 chars file name What could be the golang equivalent? Thanks! 回答1: There isn't a guid or uuid type in the standard library for Go but there are some other ways to do it, like using a third party package such as this; https://godoc.org/code.google.com/p/go-uuid/uuid or https://github.com/nu7hatch/gouuid import "github.com/nu7hatch/gouuid" id, err := uuid.NewV4() This answer has