copyright


import "android.googlesource.com/platform/tools/gpu/tools/copyright"

Usage

var (
	Generated = []*regexp.Regexp{}
	Normal    = []*regexp.Regexp{}
)

func Build

func Build(name string, i Info) string

func MatchGenerated

func MatchGenerated(file []byte) int

func MatchNormal

func MatchNormal(file []byte) int

func Regexp

func Regexp(name string, i Info, trim bool) *regexp.Regexp

type Info

type Info struct {
	Year string
	Tool string
}

type Language

type Language struct {
	Name       string
	Extensions []string
	License    string
	Emit       string
	Current    []*regexp.Regexp
	Old        []*regexp.Regexp
}

func FindExtension

func FindExtension(ext string) *Language

func FindLanguage

func FindLanguage(name string) *Language

func (*Language) MatchCurrent

func (l *Language) MatchCurrent(file []byte) int

func (*Language) MatchOld

func (l *Language) MatchOld(file []byte) int