This adds a bunch of general scaffolding and the beginning of a `build` command. The general engineering scaffolding includes: * Glide for dependency management. * A Makefile that runs govet and golint during builds. * Google's Glog library for logging. * Cobra for command line functionality. The Mu-specific scaffolding includes some packages: * mu/pkg/diag: A package for compiler-like diagnostics. It's fairly barebones at the moment, however we can embellish this over time. * mu/pkg/errors: A package containing Mu's predefined set of errors. * mu/pkg/workspace: A package containing workspace-related convenience helpers. in addition to a main entrypoint that simply wires up and invokes the CLI. From there, the mu/cmd package takes over, with the Cobra-defined CLI commands. Finally, the mu/pkg/compiler package actually implements the compiler behavior. Or, it will. For now, it simply parses a JSON or YAML Mufile into the core mu/pkg/api types, and prints out the result.
23 lines
530 B
Go
23 lines
530 B
Go
// Copyright 2016 Marapongo, Inc. All rights reserved.
|
|
|
|
package errors
|
|
|
|
import (
|
|
"github.com/marapongo/mu/pkg/diag"
|
|
)
|
|
|
|
var IllegalMufileExt = &diag.Diag{
|
|
ID: 1500,
|
|
Message: "A file named `Mufile` was located, but '%v' isn't a valid file extension (must be .json or .yaml)",
|
|
}
|
|
|
|
var CouldNotReadMufile = &diag.Diag{
|
|
ID: 1501,
|
|
Message: "An IO error occurred while reading the Mufile: %v",
|
|
}
|
|
|
|
var IllegalMufileSyntax = &diag.Diag{
|
|
ID: 1502,
|
|
Message: "A syntax error was detected while parsing the Mufile: %v",
|
|
}
|