aboutsummaryrefslogtreecommitdiff
path: root/var.go
diff options
context:
space:
mode:
authorFumitoshi Ukai <fumitoshi.ukai@gmail.com>2015-06-08 11:21:16 +0900
committerFumitoshi Ukai <fumitoshi.ukai@gmail.com>2015-06-08 11:21:16 +0900
commit936de1096b57e72d19c624df335cbc5dca4a1077 (patch)
tree326343c8a8e2804c05e38e3575e129b765a88a12 /var.go
parent8fabdd09a55e26bc340666837cd3be0744c1e1d9 (diff)
fix go lint (except comment on exported fields, error message with punct)
ast.go:70:1: comment on exported type MaybeRuleAST should be of the form "MaybeRuleAST ..." (with optional leading article) eval.go:241:1: comment on exported method Evaluator.EvaluateVar should be of the form "EvaluateVar ..." eval.go:14:2: don't use ALL_CAPS in Go names; use CamelCase eval.go:15:2: don't use ALL_CAPS in Go names; use CamelCase eval.go:16:2: don't use ALL_CAPS in Go names; use CamelCase eval.go:431:2: don't use underscores in Go names; var makefile_list should be makefileList main.go:29:2: var loadJson should be loadJSON main.go:30:2: var saveJson should be saveJSON ninja.go:19:2: struct field ruleId should be ruleID para.go:15:9: if block ends with a return statement, so drop this else and outdent its block para_test.go:21:2: don't use underscores in Go names; var num_tasks should be numTasks parser.go:713:1: error should be the last type when returning multiple items serialize.go:20:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:21:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:22:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:23:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:24:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:25:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:26:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:27:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:28:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:29:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:30:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:31:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:32:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:230:6: func DumpDepGraphAsJson should be DumpDepGraphAsJSON serialize.go:553:6: func LoadDepGraphFromJson should be LoadDepGraphFromJSON serialize.go:437:9: if block ends with a return statement, so drop this else and outdent its block var.go:174:1: receiver name should not be an underscore var.go:175:1: receiver name should not be an underscore var.go:176:1: receiver name should not be an underscore var.go:177:1: receiver name should not be an underscore var.go:178:1: receiver name should not be an underscore var.go:180:1: receiver name should not be an underscore var.go:183:1: receiver name should not be an underscore var.go:187:1: receiver name should not be an underscore var.go:191:1: receiver name should not be an underscore
Diffstat (limited to 'var.go')
-rw-r--r--var.go26
1 files changed, 13 insertions, 13 deletions
diff --git a/var.go b/var.go
index 9b335d1..5e24d3f 100644
--- a/var.go
+++ b/var.go
@@ -58,7 +58,7 @@ func (v TargetSpecificVar) Serialize() SerializableVar {
}
func (v TargetSpecificVar) Dump(w io.Writer) {
- dumpByte(w, VALUE_TYPE_TSV)
+ dumpByte(w, ValueTypeTSV)
dumpString(w, v.op)
v.v.Dump(w)
}
@@ -85,7 +85,7 @@ func (v SimpleVar) Serialize() SerializableVar {
}
}
func (v SimpleVar) Dump(w io.Writer) {
- dumpByte(w, VALUE_TYPE_SIMPLE)
+ dumpByte(w, ValueTypeSimple)
dumpBytes(w, v.value)
dumpString(w, v.origin)
}
@@ -131,7 +131,7 @@ func (v RecursiveVar) Serialize() SerializableVar {
}
}
func (v RecursiveVar) Dump(w io.Writer) {
- dumpByte(w, VALUE_TYPE_RECURSIVE)
+ dumpByte(w, ValueTypeRecursive)
v.expr.Dump(w)
dumpString(w, v.origin)
}
@@ -171,24 +171,24 @@ func (v RecursiveVar) AppendVar(ev *Evaluator, val Value) Var {
type UndefinedVar struct{}
-func (_ UndefinedVar) Flavor() string { return "undefined" }
-func (_ UndefinedVar) Origin() string { return "undefined" }
-func (_ UndefinedVar) IsDefined() bool { return false }
-func (_ UndefinedVar) String() string { return "" }
-func (_ UndefinedVar) Eval(_ io.Writer, _ *Evaluator) {
+func (UndefinedVar) Flavor() string { return "undefined" }
+func (UndefinedVar) Origin() string { return "undefined" }
+func (UndefinedVar) IsDefined() bool { return false }
+func (UndefinedVar) String() string { return "" }
+func (UndefinedVar) Eval(_ io.Writer, _ *Evaluator) {
}
-func (_ UndefinedVar) Serialize() SerializableVar {
+func (UndefinedVar) Serialize() SerializableVar {
return SerializableVar{Type: "undefined"}
}
-func (_ UndefinedVar) Dump(w io.Writer) {
- dumpByte(w, VALUE_TYPE_UNDEFINED)
+func (UndefinedVar) Dump(w io.Writer) {
+ dumpByte(w, ValueTypeUndefined)
}
-func (_ UndefinedVar) Append(*Evaluator, string) Var {
+func (UndefinedVar) Append(*Evaluator, string) Var {
return UndefinedVar{}
}
-func (_ UndefinedVar) AppendVar(_ *Evaluator, val Value) Var {
+func (UndefinedVar) AppendVar(_ *Evaluator, val Value) Var {
return UndefinedVar{}
}