mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
store: move regex to where it's used
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@ -4,7 +4,6 @@ import (
|
||||
"encoding/json"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"sort"
|
||||
|
||||
"github.com/docker/docker/pkg/ioutils"
|
||||
@ -199,8 +198,6 @@ type current struct {
|
||||
Global bool
|
||||
}
|
||||
|
||||
var namePattern = regexp.MustCompile(`^[a-zA-Z][a-zA-Z0-9\.\-_]*$`)
|
||||
|
||||
func toHash(in string) string {
|
||||
return digest.FromBytes([]byte(in)).Hex()[:20]
|
||||
}
|
||||
|
Reference in New Issue
Block a user