Lines Matching defs:String
53 // Outputs: []string{"$myPrivateVar"},
57 Import(pkgPath string)
58 ImportAs(as, pkgPath string)
60 StaticVariable(name, value string) Variable
61 VariableFunc(name string, f func(config interface{}) (string, error)) Variable
62 VariableConfigMethod(name string, method interface{}) Variable
64 StaticPool(name string, params PoolParams) Pool
65 PoolFunc(name string, f func(interface{}) (PoolParams, error)) Pool
67 StaticRule(name string, params RuleParams, argNames ...string) Rule
68 RuleFunc(name string, f func(interface{}) (RuleParams, error), argNames ...string) Rule
70 AddNinjaFileDeps(deps ...string)
76 fullName string
77 shortName string
78 pkgPath string
80 ninjaFileDeps []string
89 var packageContexts = map[string]*packageContext{}
95 func NewPackageContext(pkgPath string) PackageContext {
149 func callerName(skip int) (pkgPath, funcName string, ok bool) {
184 func pkgPathToName(pkgPath string) string {
214 // Outputs: []string{"${bar.SomeVariable}"},
223 func (p *packageContext) Import(pkgPath string) {
239 func (p *packageContext) ImportAs(as, pkgPath string) {
259 name_ string
260 value_ string
270 // exactly match the Go variable name, and the value string may reference other
272 func (p *packageContext) StaticVariable(name, value string) Variable {
292 func (v *staticVariable) name() string {
296 func (v *staticVariable) fullName(pkgNames map[*packageContext]string) string {
309 func (v *staticVariable) String() string {
315 name_ string
316 value_ func(interface{}) (string, error)
327 // exactly match the Go variable name, and the value string returned by f may
330 func (p *packageContext) VariableFunc(name string,
331 f func(config interface{}) (string, error)) Variable {
351 // a single string that will be the variable's value. It may only be called
357 // exactly match the Go variable name, and the value string returned by method
360 func (p *packageContext) VariableConfigMethod(name string,
373 fun := func(config interface{}) (string, error) {
375 resultStr := result[0].Interface().(string)
392 func (v *variableFunc) name() string {
396 func (v *variableFunc) fullName(pkgNames map[*packageContext]string) string {
415 func (v *variableFunc) String() string {
419 func validateVariableMethod(name string, methodValue reflect.Value) {
433 if kind := methodType.Out(0).Kind(); kind != reflect.String {
434 panic(fmt.Errorf("method for variable %s does not return a string",
445 name_ string
452 func (v *argVariable) name() string {
456 func (v *argVariable) fullName(pkgNames map[*packageContext]string) string {
464 func (v *argVariable) String() string {
470 name_ string
483 func (p *packageContext) StaticPool(name string, params PoolParams) Pool {
504 func (p *staticPool) name() string {
508 func (p *staticPool) fullName(pkgNames map[*packageContext]string) string {
520 func (p *staticPool) String() string {
526 name_ string
537 // exactly match the Go variable name, and the string fields of the PoolParams
540 func (p *packageContext) PoolFunc(name string, f func(interface{}) (PoolParams,
563 func (p *poolFunc) name() string {
567 func (p *poolFunc) fullName(pkgNames map[*packageContext]string) string {
583 func (p *poolFunc) String() string {
588 name_ string
595 func (p *builtinPool) name() string {
599 func (p *builtinPool) fullName(pkgNames map[*packageContext]string) string {
608 func NewBuiltinPool(name string) Pool {
614 func (p *builtinPool) String() string {
620 name_ string
622 argNames map[string]bool
639 // any of the string fields of params. Arguments can shadow package-scoped
644 // shadow package-scoped variables the default value is an empty string.
645 func (p *packageContext) StaticRule(name string, params RuleParams,
646 argNames ...string) Rule {
660 argNamesSet := make(map[string]bool)
686 func (r *staticRule) name() string {
690 func (r *staticRule) fullName(pkgNames map[*packageContext]string) string {
715 func (r *staticRule) isArg(argName string) bool {
719 func (r *staticRule) String() string {
725 name_ string
727 argNames map[string]bool
739 // exactly match the Go variable name, and the string fields of the RuleParams
745 // any of the string fields of the RuleParams returned by f. Arguments can
750 // do not shadow package-scoped variables the default value is an empty string.
751 func (p *packageContext) RuleFunc(name string, f func(interface{}) (RuleParams,
752 error), argNames ...string) Rule {
766 argNamesSet := make(map[string]bool)
792 func (r *ruleFunc) name() string {
796 func (r *ruleFunc) fullName(pkgNames map[*packageContext]string) string {
825 func (r *ruleFunc) isArg(argName string) bool {
829 func (r *ruleFunc) String() string {
834 name_ string
843 func (r *builtinRule) name() string {
847 func (r *builtinRule) fullName(pkgNames map[*packageContext]string) string {
865 func (r *builtinRule) isArg(argName string) bool {
869 func (r *builtinRule) String() string {
874 func NewBuiltinRule(name string) Rule {
880 func (p *packageContext) AddNinjaFileDeps(deps ...string) {