Fix govet issues
Change-Id: I4fb957ed10270ae3c17b458fcc7d7e11cea61417
diff --git a/package_ctx.go b/package_ctx.go
index cedee04..8e27150 100644
--- a/package_ctx.go
+++ b/package_ctx.go
@@ -96,7 +96,7 @@
checkCalledFromInit()
if _, present := packageContexts[pkgPath]; present {
- panic(fmt.Errorf("package %q already has a package context"))
+ panic(fmt.Errorf("package %q already has a package context", pkgPath))
}
pkgName := pkgPathToName(pkgPath)
diff --git a/unpack_test.go b/unpack_test.go
index b33ae79..3efd447 100644
--- a/unpack_test.go
+++ b/unpack_test.go
@@ -224,7 +224,7 @@
[]error{
&Error{
Err: fmt.Errorf("filtered field nested.foo cannot be set in a Blueprint file"),
- Pos: scanner.Position{"", 27, 4, 8},
+ Pos: mkpos(27, 4, 8),
},
},
},
@@ -399,3 +399,11 @@
}
}
}
+
+func mkpos(offset, line, column int) scanner.Position {
+ return scanner.Position{
+ Offset: offset,
+ Line: line,
+ Column: column,
+ }
+}