feat(*): dryRun/debug mode/mode plugins/googleapis

Signed-off-by: storyicon <yuanchao@bilibili.com>
This commit is contained in:
storyicon 2021-07-21 20:25:38 +08:00
parent 9aac714c32
commit da77c8086d
No known key found for this signature in database
GPG key ID: 245915D985F966CF
26 changed files with 730 additions and 126 deletions

View file

@ -18,20 +18,35 @@ import (
"os"
"path/filepath"
"github.com/fatih/color"
"github.com/storyicon/powerproto/pkg/util/logger"
)
// defines a set of const value
const (
// ConfigFileName defines the config file name
ConfigFileName = "powerproto.yaml"
// The default include can be referenced by this key in import paths
KeyPowerProtoInclude = "$POWERPROTO_INCLUDE"
// The googleapis can be referenced by this key in import paths
KeyPowerProtoGoogleAPIs = "$POWERPROTO_GOOGLEAPIS"
// KeySourceRelative can be specified in import paths to refer to
// the folder where the current proto file is located
KeySourceRelative = "$SOURCE_RELATIVE"
// Defines the program directory of PowerProto, including various binary and include files
EnvHomeDir = "POWERPROTO_HOME"
// ProtobufRepository defines the protobuf repository
ProtobufRepository = "https://github.com/protocolbuffers/protobuf"
// GoogleAPIsRepository defines the google apis repository
GoogleAPIsRepository = "https://github.com/googleapis/googleapis"
)
// defines a set of text style
var (
TextExecuteAction = color.HiGreenString("EXECUTE ACTION")
TextExecuteCommand = color.HiGreenString("EXECUTE COMMAND")
TextDryRun = color.HiGreenString("DRY RUN")
)
var homeDir string