Move generateID to util.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2017-08-11 03:03:14 +00:00
parent 07e3a2b5e2
commit 77b703f1e7
5 changed files with 31 additions and 9 deletions

24
pkg/util/id.go Normal file
View File

@@ -0,0 +1,24 @@
/*
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package util
import "github.com/docker/docker/pkg/stringid"
// GenerateID generates a random unique id.
func GenerateID() string {
return stringid.GenerateNonCryptoID()
}