100+ results results for 'regex uuid lang:go' (77 ms)
53 // UUIDv3 validates if a string is a valid version 3 UUID 54 UUIDv3 = validation.NewStringRule(govalidator.IsUUIDv3, "must be a valid UUID v3") 55 // UUIDv4 validates if a string is a valid version 4 UUID 55 // UUIDv4 validates if a string is a valid version 4 UUID 56 UUIDv4 = validation.NewStringRule(govalidator.IsUUIDv4, "must be a valid UUID v4") 57 // UUIDv5 validates if a string is a valid version 5 UUID 57 // UUIDv5 validates if a string is a valid version 5 UUID 58 UUIDv5 = validation.NewStringRule(govalidator.IsUUIDv5, "must be a valid UUID v5") 59 // UUID validates if a string is a valid UUID 59 // UUID validates if a string is a valid UUID 60 UUID = validation.NewStringRule(govalidator.IsUUID, "must be a valid UUID") 61 // CreditCard validates if a string is a valid credit card number 126 reDigit = regexp.MustCompile("^[0-9]+$") 127 // Subdomain regex source: https://stackoverflow.com/a/7933253 128 reSubdomain = regexp.MustCompile(`^[A-Za-z0-9](?:[A-Za-z0-9\-]{0,61}[A-Za-z0-9])?$`)thrift_proxy.pb.validate.go https://github.com/datawire/ambassador.git | Go | 317 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _thrift_proxy_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")quobyte.go https://github.com/trailofbits/audit-kubernetes.git | Go | 203 lines
50 log.Printf("Tenant name resolution: Resolving %s to UUID\n", request.TenantID) 51 tenantUUID, err := client.ResolveTenantNameToUUID(request.TenantID) 52 if err != nil { 65 66// ResolveVolumeNameToUUID resolves a volume name to a UUID 67func (client *QuobyteClient) ResolveVolumeNameToUUID(volumeName, tenant string) (string, error) { 91func (client *QuobyteClient) DeleteVolumeByName(volumeName, tenant string) error { 92 uuid, err := client.ResolveVolumeNameToUUID(volumeName, tenant) 93 if err != nil { 185// IsValidUUID Validates given uuid 186func IsValidUUID(uuid string) bool { 187 r := regexp.MustCompile("^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[8|9|aA|bB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$") 190 191// ResolveTenantNameToUUID Returns UUID for given name, error if not found. 192func (client *QuobyteClient) ResolveTenantNameToUUID(name string) (string, error) {searcher.go https://github.com/ClusterHQ/fli.git | Go | 493 lines
41func FindVolumesets(mds metastore.Syncable, search string) ([]*volumeset.VolumeSet, error) { 42 searchByUUID, err := uuid.IsUUID(search) 43 if err != nil { 49 if searchByUUID { 50 isShrunkID, err := uuid.IsShrunkUUID(search) 51 if err != nil { 275 // Search is an id then simply search for that ID 276 isShrunkID, err := uuid.IsShrunkUUID(search) 277 if err != nil { 335 336 check, err := uuid.IsUUID(search) 337 if err != nil { 436 for _, vol := range vols { 437 if uuid.ShrinkUUID(vol.ID.String()) == search { 438 volFound = append(volFound, vol)config.pb.validate.go https://github.com/datawire/ambassador.git | Go | 203 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _config_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")legacy_deployment_state_migrator.go https://github.com/cloudfoundry/bosh-cli.git | Go | 169 lines
12 boshsys "github.com/cloudfoundry/bosh-utils/system" 13 boshuuid "github.com/cloudfoundry/bosh-utils/uuid" 14) 22 fs boshsys.FileSystem 23 uuidGenerator boshuuid.Generator 24 logger boshlog.Logger 30 fs boshsys.FileSystem, 31 uuidGenerator boshuuid.Generator, 32 logger boshlog.Logger, 36 fs: fs, 37 uuidGenerator: uuidGenerator, 38 logger: logger, 90 } else { 91 uuid, err := m.uuidGenerator.Generate() 92 if err != nil {disk.go https://github.com/rook/rook.git | Go | 204 lines
22 "path" 23 "regexp" 24 "strconv" 33 logger = capnslog.NewPackageLogger("github.com/rook/rook", "inventory") 34 isRBD = regexp.MustCompile("^rbd[0-9]+p?[0-9]{0,}$") 35) 125 126 // get the UUID for disks 127 var diskUUID string 128 if diskType != sys.PartType { 129 diskUUID, err = sys.GetDiskUUID(d, executor) 130 if err != nil { 134 135 disk := &sys.LocalDisk{Name: d, UUID: diskUUID} 136multipart.go https://github.com/pachyderm/pachyderm.git | Go | 401 lines
7 "path" 8 "regexp" 9 "strconv" 17 "github.com/pachyderm/pachyderm/src/server/pkg/errutil" 18 "github.com/pachyderm/pachyderm/src/server/pkg/uuid" 19 22 23var multipartChunkPathMatcher = regexp.MustCompile(`([^/]+)/([^/]+)/(.+)/([^/]+)/(\d+)`) 24var multipartKeepPathMatcher = regexp.MustCompile(`([^/]+)/([^/]+)/(.+)/([^/]+)/\.keep`) 171 172 uploadID := uuid.NewWithoutDashes() 173config_source.pb.validate.go https://github.com/datawire/ambassador.git | Go | 547 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _config_source_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")resolver_api.pb.validate.go https://github.com/lyft/clutch.git | Go | 551 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _resolver_api_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")entrylist_ini.go https://github.com/JustaPenguin/assetto-server-manager.git | Go | 356 lines
187 188func (e EntryList) FindEntrantByInternalUUID(internalUUID uuid.UUID) *Entrant { 189 for _, entrant := range e { 189 for _, entrant := range e { 190 if entrant.InternalUUID == internalUUID { 191 return entrant 229 return &Entrant{ 230 InternalUUID: uuid.New(), 231 } 234type Entrant struct { 235 InternalUUID uuid.UUID `ini:"-"` 236 PitBox int `ini:"-"` 281 e.Team, other.Team = other.Team, e.Team 282 e.InternalUUID, other.InternalUUID = other.InternalUUID, e.InternalUUID 283 e.PitBox, other.PitBox = other.PitBox, e.PitBoxvbox.go https://github.com/uruddarraju/virtualbox-go.git | Go | 208 lines
9 "path/filepath" 10 "regexp" 11 "strings" 22 23var reColonLine = regexp.MustCompile(`([^:]+):\s+(.*)`) 24 26// foo="bar" 27var reKeyEqVal = regexp.MustCompile(`([^=]+)=\s*(.*)`) 28 127func (vb *VBox) modify(vm *VirtualMachine, args ...string) (string, error) { 128 return vb.manage(append([]string{"modifyvm", vm.UUIDOrName()}, args...)...) 129} 131func (vb *VBox) control(vm *VirtualMachine, args ...string) (string, error) { 132 return vb.manage(append([]string{"controlvm", vm.UUIDOrName()}, args...)...) 133}validation.go https://gitlab.com/unofficial-mirrors/openshift-origin | Go | 163 lines
4 "fmt" 5 "regexp" 6 14 15var ParameterNameRegexp = regexp.MustCompile(`^[a-zA-Z0-9_]+$`) 16 22 } 23 if !ParameterNameRegexp.MatchString(param.Name) { 24 allErrs = append(allErrs, field.Invalid(fldPath.Child("name"), param.Name, fmt.Sprintf("does not match %v", ParameterNameRegexp))) 129 130var uuidRegex = regexp.MustCompile("^(?i)[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$") 131 132func nameIsUUID(name string, prefix bool) []string { 133 if uuidRegex.MatchString(name) { 134 return nilresults.go https://gitlab.com/cybok/kubernetes | Go | 316 lines
59 Name string `mapstructure:"name" json:"name"` 60 // Specifies the request URL this rule should match for this origin to be used. Regex is supported. 61 RequestURL string `mapstructure:"request_url" json:"request_url"` 124 Name string `mapstructure:"name" json:"name"` 125 // Specifies the request URL this rule should match for this TTL to be used. Regex is supported. 126 RequestURL string `mapstructure:"request_url" json:"request_url"` 203 // Specifies the service ID that represents distributed content. The value is 204 // a UUID, such as 96737ae3-cfc1-4c72-be88-5d0e7cc9a3f0, that is generated by the server. 205 ID string `mapstructure:"id"`matcher.pb.validate.go https://github.com/envoyproxy/go-control-plane.git | Go | 585 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _matcher_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")string.pb.validate.go https://github.com/envoyproxy/go-control-plane.git | Go | 252 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _string_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") 71 72 case *StringMatcher_Regex: 73 73 74 if len(m.GetRegex()) > 1024 { 75 return StringMatcherValidationError{als.pb.validate.go https://github.com/XiaoMi/naftis.git | Go | 327 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _als_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")header_to_metadata.pb.validate.go https://github.com/datawire/ambassador.git | Go | 326 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _header_to_metadata_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") 151 152 if v, ok := interface{}(m.GetRegexValueRewrite()).(interface{ Validate() error }); ok { 153 if err := v.Validate(); err != nil { 154 return Config_KeyValuePairValidationError{ 155 field: "RegexValueRewrite", 156 reason: "embedded message failed validation",postings_list_cache_test.go https://github.com/m3db/m3.git | Go | 372 lines
53 var ( 54 segmentUUID = uuid.Parse( 55 fmt.Sprintf("00000000-0000-0000-0000-000000000%03d", i)) 72 testPlEntries = append(testPlEntries, testEntry{ 73 segmentUUID: segmentUUID, 74 key: newKey(field, pattern, patternType), 80type testEntry struct { 81 segmentUUID uuid.UUID 82 key key 176 _, ok := plCache.GetTerm( 177 testPlEntries[0].segmentUUID, 178 testPlEntries[i].key.field, 279 switch testPlEntries[i].key.patternType { 280 case PatternTypeRegexp: 281 cache.PutRegexp(filters.go https://github.com/redhat-cip/skydive.git | Go | 229 lines
24 25import "regexp" 26 53 } 54 if f.RegexFilter != nil { 55 return f.RegexFilter.Eval(g) 141 142func (r *RegexFilter) Eval(g Getter) bool { 143 field, err := g.GetFieldString(r.Key) 146 } 147 // TODO: don't compile regex here 148 re := regexp.MustCompile(r.Value) 204 terms := make([]*Filter, len(uuids)*len(attrs)) 205 for i, uuid := range uuids { 206 for j, attr := range attrs {rfc4122_test.go https://github.com/aws/amazon-ssm-agent.git | Go | 209 lines
29 } 30 if !parseUUIDRegex.MatchString(u.String()) { 31 t.Errorf("Expected string representation to be valid, given: %s", u.String()) 49 } 50 if !parseUUIDRegex.MatchString(u.String()) { 51 t.Errorf("Expected string representation to be valid, given: %s", u.String()) 69 if Equal(u4, u) { 70 t.Errorf("Expected UUIDs generated with the same namespace and different names to be different but got: %s and %s", u4, u) 71 } 97 } 98 if !parseUUIDRegex.MatchString(u.String()) { 99 t.Errorf("Expected string representation to be valid, given: %s", u.String()) 117 } 118 if !parseUUIDRegex.MatchString(u.String()) { 119 t.Errorf("Expected string representation to be valid, given: %s", u.String())route.pb.validate.go https://github.com/datawire/ambassador.git | Go | 310 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _route_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") 79 field: fmt.Sprintf("InternalOnlyHeaders[%v]", idx), 80 reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", 81 } 113 field: fmt.Sprintf("ResponseHeadersToRemove[%v]", idx), 114 reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", 115 }header_to_metadata.pb.validate.go https://github.com/datawire/ambassador.git | Go | 316 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _header_to_metadata_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") 232 field: "Header", 233 reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", 234 } 315 316var _Config_Rule_Header_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") 317service.pb.validate.go https://github.com/hb-go/micro-mesh.git | Go | 537 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _service_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")format_checkers.go https://github.com/GoogleContainerTools/skaffold.git | Go | 368 lines
93 94 // UUIDFormatChecker validates a UUID is in the correct format 95 UUIDFormatChecker struct{} 96 97 // RegexFormatChecker validates a regex is in the correct format 98 RegexFormatChecker struct{} 124 "uri-template": URITemplateFormatChecker{}, 125 "uuid": UUIDFormatChecker{}, 126 "regex": RegexFormatChecker{}, 132 // Regex credit: https://www.socketloop.com/tutorials/golang-validate-hostname 133 rxHostname = regexp.MustCompile(`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$`) 134 137 138 rxUUID = regexp.MustCompile("^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$") 139clickhouse.go https://github.com/rudderlabs/rudder-server.git | Go | 335 lines
11 "reflect" 12 "regexp" 13 "sync" 25 DateTime = types.DateTime 26 UUID = types.UUID 27) 34var ( 35 splitInsertRe = regexp.MustCompile(`(?i)\sVALUES\s*\(`) 36) 175 switch nv.Value.(type) { 176 case column.IP, column.UUID: 177 return nilendpoint_components.pb.validate.go https://github.com/XiaoMi/naftis.git | Go | 425 lines
12 "net/url" 13 "regexp" 14 "strings" 28 _ = utf8.UTFMax 29 _ = (*regexp.Regexp)(nil) 30 _ = (*strings.Reader)(nil) 39 40// define the regex for a UUID once up-front 41var _endpoint_components_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")attribute_context.pb.validate.go https://github.com/envoyproxy/go-control-plane.git | Go | 408 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _attribute_context_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")errors.go https://github.com/coreos/ignition.git | Go | 109 lines
48 ErrLabelNeedsFormat = errors.New("filesystem must specify format if label is specified") 49 ErrFormatNilWithOthers = errors.New("format cannot be empty when path, label, uuid, or options are specified") 50 ErrExt4LabelTooLong = errors.New("filesystem labels cannot be longer than 16 characters when using ext4") 64 ErrLabelTooLong = errors.New("partition labels may not exceed 36 characters") 65 ErrDoesntMatchGUIDRegex = errors.New("doesn't match the form \"01234567-89AB-CDEF-EDCB-A98765432101\"") 66 ErrLabelContainsColon = errors.New("partition label will be truncated to text before the colon")model.go https://github.com/mmcgrana/pgpin.git | Go | 360 lines
3import ( 4 "code.google.com/p/go-uuid/uuid" 5 "database/sql" 7 _ "github.com/lib/pq" 8 "regexp" 9 "time" 13 14var DataUuidRegexp = regexp.MustCompilePOSIX("[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}") 15 116 var row *sql.Row 117 if DataUuidRegexp.MatchString(idOrName) { 118 query := "SELECT id, name, url_encrypted, created_at, updated_at, version FROM dbs WHERE deleted_at is NULL AND (id=$1 OR name=$2) LIMIT 1" 294 var err error 295 if DataUuidRegexp.MatchString(idOrName) { 296 pin, err = PinGetInternal("(id=$1 OR name=$2)", idOrName, idOrName)lua.pb.validate.go https://github.com/datawire/ambassador.git | Go | 218 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _lua_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")string.go https://github.com/blend/go-sdk.git | Go | 289 lines
13 "net/url" 14 "regexp" 15 "strings" 18 "github.com/blend/go-sdk/ex" 19 "github.com/blend/go-sdk/uuid" 20) 32 ErrStringIsTitle ex.Class = "string should be titlecase" 33 ErrStringIsUUID ex.Class = "string should be a uuid" 34 ErrStringIsEmail ex.Class = "string should be a valid email address" 132 133// Matches returns a validator that a string matches a given regex. 134// It will error if the string is unset (nil). 197 198// IsUUID returns if a string is a valid uuid. 199// It will error if the string is unset (nil).prepared_query.go https://github.com/cilium/cilium.git | Go | 217 lines
77 78 // Regexp allows specifying a regex pattern to match against the name 79 // of the query being executed. 79 // of the query being executed. 80 Regexp string 81} 84type PreparedQueryDefinition struct { 85 // ID is this UUID-based ID for the query, always generated by Consul. 86 ID stringoperator_generate_root_test.go https://github.com/hashicorp/vault.git | Go | 468 lines
8 "os" 9 "regexp" 10 "strings" 330 331 reToken := regexp.MustCompile(`Encoded Token\s+(.+)`) 332 combined := ui.OutputWriter.String() + ui.ErrorWriter.String() 405 406 reToken := regexp.MustCompile(`Encoded Token\s+(.+)`) 407 combined := ui.OutputWriter.String() + ui.ErrorWriter.String() 418 // } 419 // token, err := uuid.FormatUUID(tokenBytes) 420 // if err != nil {dns_table.pb.validate.go https://github.com/datawire/ambassador.git | Go | 430 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _dns_table_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") 335 field: "Name", 336 reason: "value does not match regex pattern \"^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$\"", 337 } 429 430var _DnsTable_DnsVirtualDomain_Name_Pattern = regexp.MustCompile("^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$") 431route.pb.validate.go https://github.com/envoyproxy/go-control-plane.git | Go | 397 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _route_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")authn.pb.validate.go https://github.com/lyft/clutch.git | Go | 311 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _authn_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")health_check.pb.validate.go https://github.com/Kong/kuma.git | Go | 291 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _health_check_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")quobyte.go https://github.com/turbonomic/kubeturbo.git | Go | 245 lines
52 var response volumeUUID 53 tenantUUID, err := client.GetTenantUUID(request.TenantID) 54 if err != nil { 65 66// GetVolumeUUID resolves the volumeUUID for the given volume and tenant name. 67// This method should be used when it is not clear if the given string is volume UUID or Name. 73 } 74 volUUID, err := client.ResolveVolumeNameToUUID(volume, tenantUUID) 75 if err != nil { 134func (client *QuobyteClient) DeleteVolumeByName(volumeName, tenant string) error { 135 uuid, err := client.ResolveVolumeNameToUUID(volumeName, tenant) 136 if err != nil { 229func IsValidUUID(uuid string) bool { 230 return UUIDValidator.MatchString(uuid) 231}service.go https://github.com/mainflux/mainflux.git | Go | 395 lines
7 "context" 8 "regexp" 9 12 "github.com/mainflux/mainflux/pkg/errors" 13 uuidProvider "github.com/mainflux/mainflux/pkg/uuid" 14) 16var ( 17 groupRegexp = regexp.MustCompile("^[a-zA-Z0-9]+$") 18 177 user.Password = hash 178 uid, err := uuidProvider.New().ID() 179 if err != nil { 304func (svc usersService) CreateGroup(ctx context.Context, token string, group Group) (Group, error) { 305 if group.Name == "" || !groupRegexp.MatchString(group.Name) { 306 return Group{}, ErrMalformedEntityregexes.go https://github.com/caicloud/nirvana.git | Go | 81 lines
61 iSBN13Regex = regexp.MustCompile(iSBN13RegexString) 62 uUID3Regex = regexp.MustCompile(uUID3RegexString) 63 uUID4Regex = regexp.MustCompile(uUID4RegexString) 64 uUID5Regex = regexp.MustCompile(uUID5RegexString) 65 uUIDRegex = regexp.MustCompile(uUIDRegexString) 66 aSCIIRegex = regexp.MustCompile(aSCIIRegexString) 71 longitudeRegex = regexp.MustCompile(longitudeRegexString) 72 sSNRegex = regexp.MustCompile(sSNRegexString) 73 hostnameRegexRFC952 = regexp.MustCompile(hostnameRegexStringRFC952) 74 hostnameRegexRFC1123 = regexp.MustCompile(hostnameRegexStringRFC1123) 75 btcAddressRegex = regexp.MustCompile(btcAddressRegexString) 76 btcUpperAddressRegexBech32 = regexp.MustCompile(btcAddressUpperRegexStringBech32) 79 ethaddressRegexUpper = regexp.MustCompile(ethAddressUpperRegexString) 80 ethAddressRegexLower = regexp.MustCompile(ethAddressLowerRegexString) 81)k8s.pb.validate.go https://github.com/lyft/clutch.git | Go | 313 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _k_8_s_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")resource_arm_lighthouse_definition_test.go https://github.com/terraform-providers/terraform-provider-azurerm.git | Go | 283 lines
34 resource.TestCheckResourceAttrSet(data.ResourceName, "scope"), 35 resource.TestMatchResourceAttr(data.ResourceName, "lighthouse_definition_id", validate.UUIDRegExp), 36 ), 57 resource.TestCheckResourceAttrSet(data.ResourceName, "scope"), 58 resource.TestMatchResourceAttr(data.ResourceName, "lighthouse_definition_id", validate.UUIDRegExp), 59 ), 83 resource.TestCheckResourceAttrSet(data.ResourceName, "scope"), 84 resource.TestMatchResourceAttr(data.ResourceName, "lighthouse_definition_id", validate.UUIDRegExp), 85 resource.TestCheckResourceAttr(data.ResourceName, "description", "Acceptance Test Lighthouse Definition"), 108 resource.TestCheckResourceAttrSet(data.ResourceName, "scope"), 109 resource.TestMatchResourceAttr(data.ResourceName, "lighthouse_definition_id", validate.UUIDRegExp), 110 ), 116 resource.TestCheckResourceAttrSet(data.ResourceName, "scope"), 117 resource.TestMatchResourceAttr(data.ResourceName, "lighthouse_definition_id", validate.UUIDRegExp), 118 resource.TestCheckResourceAttr(data.ResourceName, "description", "Acceptance Test Lighthouse Definition"),db.go https://github.com/micro/services.git | Go | 345 lines
6 "fmt" 7 "regexp" 8 "strings" 10 11 "github.com/google/uuid" 12 "github.com/micro/micro/v3/service/errors" 26 27var re = regexp.MustCompile("^[a-zA-Z0-9_]*$") 28var c = cache.New(5*time.Minute, 10*time.Minute) 104 if _, ok := m[idKey].(string); !ok { 105 m[idKey] = uuid.New().String() 106 }outlier_detection_event.pb.validate.go https://github.com/datawire/ambassador.git | Go | 432 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _outlier_detection_event_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")provider_test.go https://github.com/EmileVauge/traefik.git | Go | 399 lines
211 MustMatch: true, 212 Regex: "us-east-1", 213 }, 225 MustMatch: true, 226 Regex: "us-east-1", 227 }, 239 MustMatch: false, 240 Regex: "us-east-1", 241 }, 253 MustMatch: true, 254 Regex: "us-east-*", 255 }, 267 MustMatch: true, 268 Regex: "us-east-*", 269 },regex.pb.validate.go https://github.com/envoyproxy/go-control-plane.git | Go | 294 lines
1// Code generated by protoc-gen-validate. DO NOT EDIT. 2// source: envoy/type/matcher/regex.proto 3 12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 36// define the regex for a UUID once up-front 37var _regex_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") 38 107// ErrorName returns error name. 108func (e RegexMatcherValidationError) ErrorName() string { return "RegexMatcherValidationError" } 109utils.go https://github.com/starkandwayne/shield.git | Go | 269 lines
7 "os" 8 "regexp" 9 "strconv" 150 151 re := regexp.MustCompile(`(?i)(\d+(?:\.\d+)?)\s?([kmgt])?b?`) 152 m := re.FindStringSubmatch(in) 196 197func uuid8(s string) string { 198 if len(s) < 8 { 203 204func uuid8full(s string, full bool) string { 205 if full { 207 } 208 return uuid8(s) 209}init_dump.pb.validate.go https://github.com/envoyproxy/go-control-plane.git | Go | 189 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _init_dump_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")models.go https://github.com/seuffert/rclone.git | Go | 296 lines
172type JSONModelFeature = original.JSONModelFeature 173type JSONRegexFeature = original.JSONRegexFeature 174type JSONUtterance = original.JSONUtterance 195type ListString = original.ListString 196type ListUUID = original.ListUUID 197type ListVersionInfo = original.ListVersionInfo 228type UserCollaborator = original.UserCollaborator 229type UUID = original.UUID 230type VersionInfo = original.VersionInfooperators_test.go https://bitbucket.org/asardak/atm-store.git | Go | 231 lines
69 {"NotIn", NotIn(f("name"), "Joe", "Jane"), 1}, 70 {"MatchRegexCase upper", MatchRegexCase(f("name"), "J.*"), 2}, 71 {"MatchRegexCase lower", MatchRegexCase(f("name"), "j.*"), 0}, 71 {"MatchRegexCase lower", MatchRegexCase(f("name"), "j.*"), 0}, 72 {"MatchRegex upper", MatchRegex(f("name"), "J.*"), 2}, 73 {"MatchRegex lower", MatchRegex(f("name"), "j.*"), 2}, 73 {"MatchRegex lower", MatchRegex(f("name"), "j.*"), 2}, 74 {"NotMatchRegexCase upper", NotMatchRegexCase(f("name"), "J.*"), 1}, 75 {"NotMatchRegexCase lower", NotMatchRegexCase(f("name"), "j.*"), 3}, 75 {"NotMatchRegexCase lower", NotMatchRegexCase(f("name"), "j.*"), 3}, 76 {"NotMatchRegex upper", NotMatchRegex(f("name"), "J.*"), 1}, 77 {"NotMatchRegex lower", NotMatchRegex(f("name"), "j.*"), 1}, 93 s.create(`CREATE TABLE slices ( 94 id uuid PRIMARY KEY, 95 elems bigint[]metricsgroup.go https://github.com/ZupIT/charlescd.git | Go | 333 lines
28 "io" 29 "regexp" 30 "sort" 31 32 "github.com/google/uuid" 33 "github.com/jinzhu/gorm" 39 Metrics []metric.Metric `json:"metrics"` 40 WorkspaceID uuid.UUID `json:"-"` 41 CircleID uuid.UUID `json:"circleId"` 59 60 if metricsGroup.CircleID == uuid.Nil { 61 ers = append(ers, util.ErrorUtil{Field: "circleID", Error: errors.New("CircleID is required").Error()}) 93func (main Main) PeriodValidate(currentPeriod string) error { 94 reg, err := regexp.Compile("[0-9]") 95 if err != nil {regexes.go https://github.com/runatlantis/atlantis.git | Go | 87 lines
64 iSBN13Regex = regexp.MustCompile(iSBN13RegexString) 65 uUID3Regex = regexp.MustCompile(uUID3RegexString) 66 uUID4Regex = regexp.MustCompile(uUID4RegexString) 67 uUID5Regex = regexp.MustCompile(uUID5RegexString) 68 uUIDRegex = regexp.MustCompile(uUIDRegexString) 69 aSCIIRegex = regexp.MustCompile(aSCIIRegexString) 78 btcAddressRegex = regexp.MustCompile(btcAddressRegexString) 79 btcUpperAddressRegexBech32 = regexp.MustCompile(btcAddressUpperRegexStringBech32) 80 btcLowerAddressRegexBech32 = regexp.MustCompile(btcAddressLowerRegexStringBech32) 80 btcLowerAddressRegexBech32 = regexp.MustCompile(btcAddressLowerRegexStringBech32) 81 ethAddressRegex = regexp.MustCompile(ethAddressRegexString) 82 ethaddressRegexUpper = regexp.MustCompile(ethAddressUpperRegexString) 84 uRLEncodedRegex = regexp.MustCompile(uRLEncodedRegexString) 85 hTMLEncodedRegex = regexp.MustCompile(hTMLEncodedRegexString) 86 hTMLRegex = regexp.MustCompile(hTMLRegexString)scoped_route.pb.validate.go https://github.com/datawire/ambassador.git | Go | 306 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _scoped_route_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")matter_model.go https://github.com/eyebluecn/tank.git | Go | 158 lines
10 "net/http" 11 "regexp" 12 "strings" 16const ( 17 //root matter's uuid 18 MATTER_ROOT = "root" 33 Base 34 Puuid string `json:"puuid" gorm:"type:char(36);index:idx_puuid"` 35 UserUuid string `json:"userUuid" gorm:"type:char(36);index:idx_uu"` 69 matter.Uuid = MATTER_ROOT 70 matter.UserUuid = user.Uuid 71 matter.Username = user.Username 121 } 122 if m, _ := regexp.MatchString(MATTER_NAME_PATTERN, name); m { 123 panic(result.BadRequestI18n(request, i18n.MatterNameContainSpecialChars))validation.go https://github.com/goadesign/goa.git | Go | 385 lines
4 "reflect" 5 "regexp" 6 "strconv" 18 19 // FormatUUID describes RFC4122 UUID values. 20 FormatUUID = expr.FormatUUID 46 // FormatRegexp describes regular expression syntax accepted by RE2. 47 FormatRegexp = expr.FormatRegexp 48 124// 125// FormatUUID: RFC4122 uuid 126// 138// 139// FormatRegexp: RE2 regular expression 140//odata.go https://github.com/terraform-providers/terraform-provider-azuread.git | Go | 184 lines
6 "net/url" 7 "regexp" 8 "strings" 9 10 "github.com/hashicorp/go-uuid" 11) 17func (o Id) MarshalJSON() ([]byte, error) { 18 id := regexp.MustCompile(`/v2/`).ReplaceAllString(string(o), `/v1.0/`) 19 21 if err != nil || u.Scheme == "" || u.Host == "" { 22 matches := regexp.MustCompile(`([a-zA-Z]+)\(['"]([^'"]+)['"]\)`).FindStringSubmatch(id) 23 if len(matches) != 3 { 28 guid := matches[2] 29 if _, err = uuid.ParseUUID(guid); err != nil { 30 return nil, fmt.Errorf("Marshaling odata.Id: %+v", err)requests.go https://github.com/openshift/installer.git | Go | 384 lines
31 CompareTypeEqual CompareType = "EQUAL_TO" 32 CompareTypeRegex CompareType = "REGEX" 33 CompareTypeStartWith CompareType = "STARTS_WITH" 53 54 // TenantID is the UUID of the tenant who owns the L7 policy in octavia. 55 // Only administrative users can specify a project UUID other than their own. 226 227 // The comparison type for the L7 rule. One of CONTAINS, ENDS_WITH, EQUAL_TO, REGEX, or STARTS_WITH. 228 CompareType CompareType `json:"compare_type" required:"true"` 232 233 // TenantID is the UUID of the tenant who owns the rule in octavia. 234 // Only administrative users can specify a project UUID other than their own. 339 340 // The comparison type for the L7 rule. One of CONTAINS, ENDS_WITH, EQUAL_TO, REGEX, or STARTS_WITH. 341 CompareType CompareType `json:"compare_type,omitempty"`value.pb.validate.go https://github.com/datawire/ambassador.git | Go | 320 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _value_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")gatt_tool_test.go https://gitlab.com/brucealdridge/driver-go-blecombined | Go | 42 lines
11 12func TestCharacteristicsRegex(t *testing.T) { 13 line := "handle = 0x0002, char properties = 0x0a, char value handle = 0x0003, uuid = 00002a00-0000-1000-8000-00805f9b34fb" 25 if params["uuid"] != "00002a00-0000-1000-8000-00805f9b34fb" { 26 t.Errorf("bad characteristic uuid %v", params["uuid"]) 27 }rbac.pb.validate.go https://github.com/datawire/ambassador.git | Go | 130 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _rbac_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")event_service_config.pb.validate.go https://github.com/datawire/ambassador.git | Go | 126 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _event_service_config_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")utils.go https://github.com/dnote/dnote.git | Go | 48 lines
21import ( 22 "regexp" 23 23 24 "github.com/google/uuid" 25 "github.com/pkg/errors" 27 28// GenerateUUID returns a uuid v4 in string 29func GenerateUUID() (string, error) { 29func GenerateUUID() (string, error) { 30 u, err := uuid.NewRandom() 31 if err != nil { 37 38// regexNumber is a regex that matches a string that looks like an integer 39var regexNumber = regexp.MustCompile(`^\d+$`)clusters.pb.validate.go https://github.com/XiaoMi/naftis.git | Go | 436 lines
12 "net/url" 13 "regexp" 14 "strings" 28 _ = utf8.UTFMax 29 _ = (*regexp.Regexp)(nil) 30 _ = (*strings.Reader)(nil) 39 40// define the regex for a UUID once up-front 41var _clusters_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")discovery.pb.validate.go https://github.com/datawire/ambassador.git | Go | 487 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _discovery_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")securitygrouprules.go https://github.com/kubernetes/kops.git | Go | 205 lines
23 "net/url" 24 "regexp" 25 "strconv" 26 27 "github.com/google/uuid" 28 "github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/security/rules" 43func (m *MockClient) mockSecurityGroupRules() { 44 re := regexp.MustCompile(`/security-group-rules/?`) 45 127 rule := rules.SecGroupRule{ 128 ID: uuid.New().String(), 129 PortRangeMax: create.SecurityGroupRule.PortRangeMax,utils.go https://gitlab.com/prima101112/test-quiz | Go | 264 lines
7 "reflect" 8 "regexp" 9 "runtime" 25// Copied from golint 26var commonInitialisms = []string{"API", "ASCII", "CPU", "CSS", "DNS", "EOF", "GUID", "HTML", "HTTP", "HTTPS", "ID", "IP", "JSON", "LHS", "QPS", "RAM", "RHS", "RPC", "SLA", "SMTP", "SSH", "TLS", "TTL", "UI", "UID", "UUID", "URI", "URL", "UTF8", "VM", "XML", "XSRF", "XSS"} 27var commonInitialismsReplacer *strings.Replacer 173 _, file, line, ok := runtime.Caller(i) 174 if ok && (!regexp.MustCompile(`jinzhu/gorm/.*.go`).MatchString(file) || regexp.MustCompile(`jinzhu/gorm/.*test.go`).MatchString(file)) { 175 return fmt.Sprintf("%v:%v", file, line)accesslog.pb.validate.go https://github.com/cilium/cilium.git | Go | 517 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _accesslog_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")functions.go https://github.com/terraform-providers/terraform-provider-azurerm.git | Go | 146 lines
14 "timestamp", 15 "uuid", 16} 90 "range": stdlib.RangeFunc, 91 "regex": stdlib.RegexFunc, 92 "regexall": stdlib.RegexAllFunc, 120 "urlencode": funcs.URLEncodeFunc, 121 "uuid": funcs.UUIDFunc, 122 "uuidv5": funcs.UUIDV5Func,regutils.go https://github.com/yunionio/onecloud.git | Go | 243 lines
23var FUNCTION_REG *regexp.Regexp 24var UUID_REG *regexp.Regexp 25var UUID_EXACT_REG *regexp.Regexp 25var UUID_EXACT_REG *regexp.Regexp 26var INTEGER_REG *regexp.Regexp 27var FLOAT_REG *regexp.Regexp 27var FLOAT_REG *regexp.Regexp 28var MACADDR_REG *regexp.Regexp 29var COMPACT_MACADDR_REG *regexp.Regexp 29var COMPACT_MACADDR_REG *regexp.Regexp 30var NSPTR_REG *regexp.Regexp 31var NAME_REG *regexp.Regexp 54 FUNCTION_REG = regexp.MustCompile(`^\w+\(.*\)$`) 55 UUID_REG = regexp.MustCompile(`[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}`) 56 UUID_EXACT_REG = regexp.MustCompile(`^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$`)exporterd.go https://github.com/gluster/gluster-prometheus.git | Go | 179 lines
9 "path/filepath" 10 "regexp" 11 "strings" 18var ( 19 peerIDPattern = regexp.MustCompile("[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}") 20) 33 var maxPeerID string 34 //This for loop iterates among all the peers and finds the peer with the maximum UUID (lexicographically) 35 for i, pr := range peerList { 116func (g *GD1) LocalPeerID() (string, error) { 117 keywordID := "UUID" 118 peeridFile := g.config.GlusterdWorkdir + "/glusterd.info" 128 keywordID := "peer-id" 129 peeridFile := g.config.GlusterdWorkdir + "/uuid.toml" 130 fileStream, err := os.Open(filepath.Clean(peeridFile))query.go https://github.com/xormplus/xorm.git | Go | 534 lines
10 "reflect" 11 "regexp" 12 "strings" 55 expr := `^\s*SELECT\s*` 56 reg, err := regexp.Compile(expr) 57 if err != nil { 96 var dialect = statement.dialect 97 rownumber := "xorm" + utils.NewShortUUID().String() 98 sql := statement.genSelectSql(dialect, rownumber)requests.go https://github.com/kubeup/archon.git | Go | 156 lines
4 "net" 5 "regexp" 6 "strings" 42 43 uuidRegex, _ := regexp.Compile("^[a-z0-9]{8}-[a-z0-9]{4}-[1-5][a-z0-9]{3}-[a-z0-9]{4}-[a-z0-9]{12}$") 44 45 if opts.Group != "" { 46 if !uuidRegex.MatchString(opts.Group) { 47 err := gophercloud.ErrInvalidInput{} 57 for _, diffHost := range opts.DifferentHost { 58 if !uuidRegex.MatchString(diffHost) { 59 err := gophercloud.ErrInvalidInput{} 70 for _, sameHost := range opts.SameHost { 71 if !uuidRegex.MatchString(sameHost) { 72 err := gophercloud.ErrInvalidInput{}datasource_digitalocean_loadbalancer_test.go https://github.com/terraform-providers/terraform-provider-digitalocean.git | Go | 185 lines
5 "fmt" 6 "regexp" 7 "testing" 19 20 expectedURNRegEx, _ := regexp.Compile(`do:loadbalancer:[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}`) 21 52 resource.TestMatchResourceAttr( 53 "data.digitalocean_loadbalancer.foobar", "urn", expectedURNRegEx), 54 resource.TestCheckResourceAttrSet( 54 resource.TestCheckResourceAttrSet( 55 "data.digitalocean_loadbalancer.foobar", "vpc_uuid"), 56 resource.TestCheckResourceAttr(mysql.go https://github.com/gobuffalo/fizz.git | Go | 300 lines
4 "fmt" 5 "regexp" 6 "strings" 217 d := fmt.Sprintf("%#v", c.Options["default"]) 218 re := regexp.MustCompile("^(\")(.+)(\")$") 219 d = re.ReplaceAllString(d, "'$2'") 240 return fmt.Sprintf("VARCHAR (%s)", s) 241 case "uuid": 242 return "char(36)"util_test.go https://github.com/dollarshaveclub/furan.git | Go | 405 lines
6 "net" 7 "regexp" 8 "testing" 225 226func TestGenerateUUID(t *testing.T) { 227 t.Parallel() 227 t.Parallel() 228 prev := generateUUID() 229 for i := 0; i < 100; i++ { 229 for i := 0; i < 100; i++ { 230 id := generateUUID() 231 if prev == id { 234 235 matched, err := regexp.MatchString( 236 "[\\da-f]{8}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{12}", id)list_collections.go https://github.com/scality/Zenko.git | Go | 141 lines
18 "go.mongodb.org/mongo-driver/x/mongo/driver/topology" 19 "go.mongodb.org/mongo-driver/x/mongo/driver/uuid" 20 "go.mongodb.org/mongo-driver/x/network/command" 34 selector description.ServerSelector, 35 clientID uuid.UUID, 36 pool *session.Pool, 117func transformFilter(filter bsonx.Doc, dbName string) (bsonx.Doc, error) { 118 regexFilter := bsonx.Doc{ 119 {"name", bsonx.Regex("^[^$]*$", "")}, 122 if filter == nil { 123 return regexFilter, nil 124 } 136 137 filterArr := bsonx.Arr{bsonx.Document(regexFilter), bsonx.Document(converted)} 138 return bsonx.Doc{prepared_query.go https://github.com/backstage/backstage.git | Go | 353 lines
4 "fmt" 5 "regexp" 6 11 12// validUUID is used to check if a given string looks like a UUID 13var validUUID = regexp.MustCompile(`(?i)^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$`) 14 15// isUUID returns true if the given string is a valid UUID. 16func isUUID(str string) bool { 16func isUUID(str string) bool { 17 return validUUID.MatchString(str) 18} 148 // queries from ever making it into the state store. Note that we have 149 // to see if the name looks like a UUID before checking since the UUID 150 // index will complain if we look up something that's not formattedformatters.go https://github.com/ghetzel/pivot.git | Go | 287 lines
7 "fmt" 8 "regexp" 9 "strings" 51 switch name { 52 case `uuid`: 53 return GenerateUUID, nil 54 55 case `encoded-uuid`: 56 var encoder EncoderFunc 68 69 return GenerateEncodedUUID(encoder), nil 70 162 163 if rx, err := regexp.Compile(find); err == nil { 164 vStr = rx.ReplaceAllString(vStr, replace)appiconset.go https://github.com/bitrise-io/codesigndoc.git | Go | 172 lines
6 "path/filepath" 7 "regexp" 8 "strings" 78 79 re := regexp.MustCompile(`\$\{(.+)\}`) 80 wildcharAppIconSetName := re.ReplaceAllString(appIconSetName, "*") 81 82 matches, err := filepath.Glob(path.Join(regexp.QuoteMeta(resolvedPath), wildcharAppIconSetName+".appiconset")) 83 if err != nil { 108func filterResourcesBuildPhase(buildPhases []string, objects serialized.Object) (resourcesBuildPhase, error) { 109 for _, buildPhaseUUID := range buildPhases { 110 rawBuildPhase, err := objects.Object(buildPhaseUUID) 114 if isResourceBuildPhase(rawBuildPhase) { 115 buildPhase, err := parseResourcesBuildPhase(buildPhaseUUID, objects) 116 if err != nil {dns_cache.pb.validate.go https://github.com/datawire/ambassador.git | Go | 270 lines
12 "net/url" 13 "regexp" 14 "strings" 28 _ = utf8.UTFMax 29 _ = (*regexp.Regexp)(nil) 30 _ = (*strings.Reader)(nil) 39 40// define the regex for a UUID once up-front 41var _dns_cache_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")funcs_ast_validator.go https://github.com/emqx/kuiper.git | Go | 421 lines
102 } 103 case "endswith", "indexof", "regexp_matches", "startswith": 104 if err := validateLen(name, 2, len); err != nil { 123 124 case "regexp_replace": 125 if err := validateLen(name, 3, len); err != nil { 284 } 285 case "newuuid": 286 if err := validateLen(name, 0, len); err != nil {csds.pb.validate.go https://github.com/envoyproxy/go-control-plane.git | Go | 440 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _csds_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")http_uri.pb.validate.go https://github.com/datawire/ambassador.git | Go | 155 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _http_uri_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")path_role_create.go https://github.com/Caiyeon/goldfish.git | Go | 120 lines
5 6 "github.com/hashicorp/go-uuid" 7 "github.com/hashicorp/vault/logical" 13 return &framework.Path{ 14 Pattern: "creds/" + framework.GenericNameRegex("name"), 15 Fields: map[string]*framework.FieldSchema{ 47 // Ensure username is unique 48 uuidVal, err := uuid.GenerateUUID() 49 if err != nil { 51 } 52 username := fmt.Sprintf("%s-%s", req.DisplayName, uuidVal) 53 53 54 password, err := uuid.GenerateUUID() 55 if err != nil {tcp_proxy.pb.validate.go https://github.com/datawire/ambassador.git | Go | 486 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _tcp_proxy_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")format_checkers.go https://bitbucket.org/RusAlex/cryptocoins.git | Go | 250 lines
62 63 // UUIDFormatChecker validates a UUID is in the correct format 64 UUIDFormatChecker struct{} 65 66 // RegexFormatChecker validates a regex is in the correct format 67 RegexFormatChecker struct{} 81 "uri-reference": URIReferenceFormatChecker{}, 82 "uuid": UUIDFormatChecker{}, 83 "regex": RegexFormatChecker{}, 87 // Regex credit: https://github.com/asaskevich/govalidator 88 rxEmail = regexp.MustCompile("^(((([a-zA-Z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])+(\\.([a-zA-Z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])([a-zA-Z]|\\d|-|\\.|_|~|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])*([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])))\\.)+(([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])([a-zA-Z]|\\d|-|\\.|_|~|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])*([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])))\\.?$") 89 92 93 rxUUID = regexp.MustCompile("^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$") 94)backend_test.go https://gitlab.com/unofficial-mirrors/kubernetes | Go | 158 lines
21 "reflect" 22 "regexp" 23 "testing" 25 26 "github.com/pborman/uuid" 27 47 &auditinternal.Event{ 48 AuditID: types.UID(uuid.NewRandom().String()), 49 }, 61 RequestReceivedTimestamp: metav1.NewMicroTime(time.Now()), 62 AuditID: types.UID(uuid.NewRandom().String()), 63 Stage: auditinternal.StageRequestReceived, 79 &auditinternal.Event{ 80 AuditID: types.UID(uuid.NewRandom().String()), 81 Level: auditinternal.LevelMetadata,sriovnet.go https://github.com/kubevirt/ovs-cni.git | Go | 455 lines
9 "path/filepath" 10 "regexp" 11 "strconv" 13 14 "github.com/google/uuid" 15 "github.com/vishvananda/netlink" 25 26var virtFnRe = regexp.MustCompile(`virtfn(\d+)`) 27 225func SetVfDefaultGUID(handle *PfNetdevHandle, vf *VfObj) error { 226 randUUID, err := uuid.NewRandom() 227 if err != nil { 229 } 230 guid := randUUID[0:8] 231 guid[7] = byte(vf.Index)control.go https://gitlab.com/minhajuddin/gitlab-ci-multi-runner | Go | 243 lines
12 "os/exec" 13 "regexp" 14 "runtime" 73 74 versionRe := regexp.MustCompile(`prlctl version (\d+\.\d+.\d+)`) 75 matches := versionRe.FindStringSubmatch(string(out)) 117 snapshot = strings.TrimSpace(snapshot) 118 if len(snapshot) > 0 { // It uses UUID so it should be 38 119 return snapshot, nil 193 stdoutString := strings.TrimSpace(output) 194 re := regexp.MustCompile("net0.* mac=([0-9A-F]{12}) card=.*") 195 macMatch := re.FindAllStringSubmatch(stdoutString, 1) 222 223 re := regexp.MustCompile("(.*)=\"(.*),(.*)," + strings.ToLower(mac) + ",.*\"") 224 mostRecentIP := ""graph.go https://github.com/Azure/acs-engine.git | Go | 154 lines
8 "fmt" 9 "regexp" 10 "time" 16 "github.com/Azure/go-autorest/autorest/to" 17 "github.com/satori/go.uuid" 18 log "github.com/sirupsen/logrus" 68 69 servicePrincipalClientSecret = uuid.NewV4().String() 70 79 { 80 KeyID: to.StringPtr(uuid.NewV4().String()), 81 StartDate: &startDate, 117func (az *AzureClient) CreateRoleAssignmentSimple(ctx context.Context, resourceGroup, servicePrincipalObjectID string) error { 118 roleAssignmentName := uuid.NewV4().String() 119handler.go https://gitlab.com/0072016/docker-registry | Go | 235 lines
9 "path/filepath" 10 "regexp" 11 "time" 15 Method string 16 Regexp *regexp.Regexp 17 Handler func(http.ResponseWriter, *http.Request, [][]string) 19 20func GenerateUUID() string { 21 f, _ := os.Open("/dev/urandom") 185 } 186 h.Mappings = append(h.Mappings, &Mapping{t, regexp.MustCompile("/v(\\d+)/" + re), f}) 187} 203 started := time.Now() 204 uuid := GenerateUUID() 205 w.Header().Add("X-Request-ID", uuid)apps.go https://github.com/remind101/empire.git | Go | 280 lines
7 "fmt" 8 "regexp" 9 "strings" 21 22// NamePattern is a regex pattern that app names must conform to. 23var NamePattern = regexp.MustCompile(`^[a-z][a-z0-9-]{2,30}$`) 67type App struct { 68 // A unique uuid that identifies the application. 69 ID stringlist_test.go https://github.com/dotcloud/docker.git | Go | 144 lines
12 "github.com/docker/docker/image" 13 "github.com/google/uuid" 14 "github.com/opencontainers/go-digest" 37 var ( 38 id = uuid.New().String() 39 computedImageID = digest.FromString(id) 109 110 // moby/moby #37453 - ^ regex not working due to prefix slash 111 // not being strippedregexes.go https://gitlab.com/nidhomriza/handbook-tes | Go | 97 lines
70 iSBN13Regex = regexp.MustCompile(iSBN13RegexString) 71 uUID3Regex = regexp.MustCompile(uUID3RegexString) 72 uUID4Regex = regexp.MustCompile(uUID4RegexString) 72 uUID4Regex = regexp.MustCompile(uUID4RegexString) 73 uUID5Regex = regexp.MustCompile(uUID5RegexString) 74 uUIDRegex = regexp.MustCompile(uUIDRegexString) 74 uUIDRegex = regexp.MustCompile(uUIDRegexString) 75 uUID3RFC4122Regex = regexp.MustCompile(uUID3RFC4122RegexString) 76 uUID4RFC4122Regex = regexp.MustCompile(uUID4RFC4122RegexString) 77 uUID5RFC4122Regex = regexp.MustCompile(uUID5RFC4122RegexString) 78 uUIDRFC4122Regex = regexp.MustCompile(uUIDRFC4122RegexString) 79 aSCIIRegex = regexp.MustCompile(aSCIIRegexString) 85 sSNRegex = regexp.MustCompile(sSNRegexString) 86 hostnameRegexRFC952 = regexp.MustCompile(hostnameRegexStringRFC952) 87 hostnameRegexRFC1123 = regexp.MustCompile(hostnameRegexStringRFC1123)user_event.go https://github.com/dollarshaveclub/furan.git | Go | 265 lines
4 "fmt" 5 "regexp" 6 7 "github.com/hashicorp/consul/agent/consul/structs" 8 "github.com/hashicorp/go-uuid" 9) 56 if params.NodeFilter != "" { 57 if _, err := regexp.Compile(params.NodeFilter); err != nil { 58 return fmt.Errorf("Invalid node filter: %v", err) 82 var err error 83 if params.ID, err = uuid.GenerateUUID(); err != nil { 84 return fmt.Errorf("UUID generation failed: %v", err) 163 164 var tagRe *regexp.Regexp 165 if msg.TagFilter != "" {user_event.go https://github.com/kris-nova/terraformctl.git | Go | 265 lines
4 "fmt" 5 "regexp" 6 7 "github.com/hashicorp/consul/agent/structs" 8 "github.com/hashicorp/go-uuid" 9) 56 if params.NodeFilter != "" { 57 if _, err := regexp.Compile(params.NodeFilter); err != nil { 58 return fmt.Errorf("Invalid node filter: %v", err) 82 var err error 83 if params.ID, err = uuid.GenerateUUID(); err != nil { 84 return fmt.Errorf("UUID generation failed: %v", err) 163 164 var tagRe *regexp.Regexp 165 if msg.TagFilter != "" {violetear.go https://github.com/nbari/violetear.git | Go | 312 lines
21// 22// func handleUUID(w http.ResponseWriter, r *http.Request) { 23// fmt.Fprintf(w, r.URL.Path[1:]) 30// 31// router.AddRegex(":uuid", `[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}`) 32// 34// router.HandleFunc("/hello", helloWorld, "GET,HEAD") 35// router.HandleFunc("/root/:uuid/item", handleUUID, "POST,PUT") 36// 123 if _, ok := r.dynamicRoutes[p]; !ok { 124 r.err = fmt.Errorf("[%s] not found, need to add it using AddRegex(%q, `your regex`", p, p) 125 return nil 153// AddRegex adds a ":named" regular expression to the dynamicRoutes 154func (r *Router) AddRegex(name, regex string) error { 155 return r.dynamicRoutes.Set(name, regex)message_matcher.go https://gitlab.com/karouf/heka | Go | 245 lines
72 switch stmt.field.tokenId { 73 case VAR_UUID: 74 return msg.GetUuidString() 124 case OP_RE: 125 if stmt.value.regexp != nil { 126 return stmt.value.regexp.MatchString(s) 132 case OP_NRE: 133 if stmt.value.regexp != nil { 134 return !stmt.value.regexp.MatchString(s) 182 switch stmt.field.tokenId { 183 case VAR_UUID, VAR_TYPE, VAR_LOGGER, VAR_PAYLOAD, 184 VAR_ENVVERSION, VAR_HOSTNAME:types.go git://github.com/eclark/exl.git | Go | 550 lines
29 NullType 30 RegexType 31 dbPointerType 47 OldBinaryType 48 UUIDType 49 MD5Type BinSubtype = 5 340 341type Regex struct { 342 Pattern string 345 346func (re *Regex) WriteTo(w io.Writer) (n int64, err os.Error) { 347 return write(w, []byte(re.Pattern), byte(0), []byte(re.Options), byte(0)) 349 350func (re *Regex) ReadFrom(r io.Reader) (n int64, err os.Error) { 351 var v bytemetric_cluster.go https://github.com/hashicorp/vault.git | Go | 261 lines
13 "net/url" 14 "regexp" 15 29 MatchingMetrics []string `json:"_matching_metrics,omitempty"` // [] len >= 1 (result info only, if query has extras - cannot be set) 30 MatchingUUIDMetrics map[string][]string `json:"_matching_uuid_metrics,omitempty"` // [] len >= 1 (result info only, if query has extras - cannot be set) 31 Name string `json:"name"` // string 48 49 matched, err := regexp.MatchString(config.MetricClusterCIDRegex, clusterCID) 50 if err != nil { 132 133 matched, err := regexp.MatchString(config.MetricClusterCIDRegex, clusterCID) 134 if err != nil { 206 207 matched, err := regexp.MatchString(config.MetricClusterCIDRegex, clusterCID) 208 if err != nil {extension.pb.validate.go https://github.com/envoyproxy/go-control-plane.git | Go | 219 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _extension_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")common.pb.validate.go https://github.com/datawire/ambassador.git | Go | 314 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _common_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")cache.pb.validate.go https://github.com/datawire/ambassador.git | Go | 242 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _cache_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")path_roles.go https://github.com/Caiyeon/goldfish.git | Go | 233 lines
27 return &framework.Path{ 28 Pattern: "roles/" + framework.GenericNameRegex("name"), 29 Fields: map[string]*framework.FieldSchema{ 221The "username_length" parameter determines how many total characters the 222generated username (including the role name, token display name and the uuid 223portion) will be truncated to. Versions of MySQL prior to 5.7.8 are limited tomenu.go https://github.com/GoAdminGroup/go-admin.git | Go | 261 lines
8 "html/template" 9 "regexp" 10 "strconv" 69 70 reg, _ := regexp.Compile(`\?(.*)`) 71 path = reg.ReplaceAllString(path, "") 134 Header string `json:"header"` 135 Uuid string `json:"uuid"` 136} 154 "title": data.Title, 155 "uuid": data.Uuid, 156 "icon": data.Icon,module.pb.validate.go https://github.com/bufbuild/buf.git | Go | 287 lines
26 "net/url" 27 "regexp" 28 "strings" 40 _ = utf8.UTFMax 41 _ = (*regexp.Regexp)(nil) 42 _ = (*strings.Reader)(nil) 49 50// define the regex for a UUID once up-front 51var _module_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")read_through_segment_test.go https://github.com/m3db/m3.git | Go | 416 lines
57 require.NoError(t, err) 58 compiledRegex := index.CompiledRegex{ 59 FSTSyntax: parsedRegex, 96 require.NoError(t, err) 97 compiledRegex := index.CompiledRegex{ 98 FSTSyntax: parsedRegex, 150 // Make sure it it works with no cache. 151 pl, err := readThrough.MatchRegexp(field, compiledRegex) 152 require.NoError(t, err) 276 277 segmentUUID := readThroughSeg.(*ReadThroughSegment).uuid 278 280 // gets purged after. 281 cache.PutRegexp(segmentUUID, "some-field", "some-pattern", roaring.NewPostingsList()) 282metadata.pb.validate.go https://github.com/datawire/ambassador.git | Go | 235 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _metadata_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")header_to_metadata.pb.validate.go https://github.com/datawire/ambassador.git | Go | 333 lines
12 "net/url" 13 "regexp" 14 "strings" 26 _ = utf8.UTFMax 27 _ = (*regexp.Regexp)(nil) 28 _ = (*strings.Reader)(nil) 35 36// define the regex for a UUID once up-front 37var _header_to_metadata_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$") 158 159 case *Config_KeyValuePair_RegexValueRewrite: 160 160 161 if v, ok := interface{}(m.GetRegexValueRewrite()).(interface{ Validate() error }); ok { 162 if err := v.Validate(); err != nil {pools.go https://github.com/kubernetes/kops.git | Go | 159 lines
23 "net/url" 24 "regexp" 25 25 26 "github.com/google/uuid" 27 "github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/pools" 42func (m *MockClient) mockPools() { 43 re := regexp.MustCompile(`/lbaas/pools/?`) 44 139 p := pools.Pool{ 140 ID: uuid.New().String(), 141 Name: create.Pool.Name,control.go https://gitlab.com/larsla/gitlab-ci-multi-runner | Go | 271 lines
10 "os/exec" 11 "regexp" 12 "strings" 107 } 108 portRe := regexp.MustCompile(`guestssh.*host port = (\d+)`) 109 sshPort := portRe.FindStringSubmatch(info) 148 } 149 allPortsRe := regexp.MustCompile(`host port = (\d+)`) 150 usedPorts = allPortsRe.FindAllStringSubmatch(output, -1) 208 } 209 snapshotRe := regexp.MustCompile(fmt.Sprintf(`(?m)^Snapshot(Name|UUID)[^=]*="%s"$`, regexp.QuoteMeta(snapshotName))) 210 snapshot := snapshotRe.FindStringSubmatch(output) 218 } 219 snapshotRe := regexp.MustCompile(`(?m)^CurrentSnapshotName="([^"]*)"$`) 220 snapshot := snapshotRe.FindStringSubmatch(output)