Add json mapping for command and commandResult.

Also exports the fields on these structs so that json
can read/write them.

BUG=chromium:773875
TEST=unit test

Change-Id: I0efead41693dd35548738a0b3a3e5c71c97c319c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1706790
Reviewed-by: George Burgess <gbiv@chromium.org>
Tested-by: Tobias Bosch <tbosch@google.com>
diff --git a/compiler_wrapper/errors.go b/compiler_wrapper/errors.go
index 7095e37..8cf9634 100644
--- a/compiler_wrapper/errors.go
+++ b/compiler_wrapper/errors.go
@@ -72,10 +72,10 @@
 
 func getCCacheError(compilerCmd *command, compilerCmdErr error) (ccacheErr userError, ok bool) {
 	if en, ok := compilerCmdErr.(syscall.Errno); ok && en == syscall.ENOENT &&
-		strings.Contains(compilerCmd.path, "ccache") {
+		strings.Contains(compilerCmd.Path, "ccache") {
 		ccacheErr =
 			newUserErrorf("ccache not found under %s. Please install it",
-				compilerCmd.path)
+				compilerCmd.Path)
 		return ccacheErr, true
 	}
 	return ccacheErr, false