blob: 06be22e466b4fac7396c130b5f0303340539e5a1 [file] [log] [blame]
// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package protoreflect
import (
"regexp"
)
// TODO: This is a stub while the full implementation is under review.
// See https://golang.org/cl/127823.
type Name string
var (
regexName = regexp.MustCompile(`^[_a-zA-Z][_a-zA-Z0-9]*$`)
)
func (n Name) IsValid() bool {
return regexName.MatchString(string(n))
}