build: remove Build stutter from BuildConstraint*
Address golint failure.
This commit is contained in:
@@ -47,7 +47,7 @@ func (c *Context) Package(path string) {
|
||||
c.pkg = pkg
|
||||
}
|
||||
|
||||
func (c *Context) BuildConstraints(t buildtags.ConstraintsConvertable) {
|
||||
func (c *Context) Constraints(t buildtags.ConstraintsConvertable) {
|
||||
cs := t.ToConstraints()
|
||||
if err := cs.Validate(); err != nil {
|
||||
c.AddError(err)
|
||||
@@ -56,17 +56,17 @@ func (c *Context) BuildConstraints(t buildtags.ConstraintsConvertable) {
|
||||
c.file.Constraints = cs
|
||||
}
|
||||
|
||||
func (c *Context) BuildConstraint(t buildtags.ConstraintConvertable) {
|
||||
c.BuildConstraints(append(c.file.Constraints, t.ToConstraint()))
|
||||
func (c *Context) Constraint(t buildtags.ConstraintConvertable) {
|
||||
c.Constraints(append(c.file.Constraints, t.ToConstraint()))
|
||||
}
|
||||
|
||||
func (c *Context) BuildConstraintExpr(expr string) {
|
||||
func (c *Context) ConstraintExpr(expr string) {
|
||||
constraint, err := buildtags.ParseConstraint(expr)
|
||||
if err != nil {
|
||||
c.AddError(err)
|
||||
return
|
||||
}
|
||||
c.BuildConstraint(constraint)
|
||||
c.Constraint(constraint)
|
||||
}
|
||||
|
||||
func (c *Context) Function(name string) {
|
||||
|
||||
@@ -53,9 +53,9 @@ func Generate() {
|
||||
}
|
||||
}
|
||||
|
||||
func BuildConstraints(t buildtags.ConstraintsConvertable) { ctx.BuildConstraints(t) }
|
||||
func BuildConstraint(t buildtags.ConstraintConvertable) { ctx.BuildConstraint(t) }
|
||||
func BuildConstraintExpr(expr string) { ctx.BuildConstraintExpr(expr) }
|
||||
func Constraints(t buildtags.ConstraintsConvertable) { ctx.Constraints(t) }
|
||||
func Constraint(t buildtags.ConstraintConvertable) { ctx.Constraint(t) }
|
||||
func ConstraintExpr(expr string) { ctx.ConstraintExpr(expr) }
|
||||
|
||||
func GP8v() reg.GPVirtual { return ctx.GP8v() }
|
||||
func GP16v() reg.GPVirtual { return ctx.GP16v() }
|
||||
|
||||
Reference in New Issue
Block a user