Remove Environment as we already have env
and expandenv
filters from sprig
This commit is contained in:
parent
69cc91572b
commit
47ef416835
4
Makefile
4
Makefile
@ -1,13 +1,13 @@
|
|||||||
.PHONY: build
|
.PHONY: build
|
||||||
build:
|
build:
|
||||||
go build -o protoc-gen-gotemplate .
|
go build -v -i -o protoc-gen-gotemplate .
|
||||||
|
|
||||||
.PHONY: install
|
.PHONY: install
|
||||||
install:
|
install:
|
||||||
go install .
|
go install .
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test: build
|
test: install
|
||||||
cd examples/import && make
|
cd examples/import && make
|
||||||
cd examples/dummy && make
|
cd examples/dummy && make
|
||||||
cd examples/flow && make
|
cd examples/flow && make
|
||||||
|
@ -34,7 +34,6 @@ type Ast struct {
|
|||||||
Filename string `json:"filename"`
|
Filename string `json:"filename"`
|
||||||
TemplateDir string `json:"template-dir"`
|
TemplateDir string `json:"template-dir"`
|
||||||
Service *descriptor.ServiceDescriptorProto `json:"service"`
|
Service *descriptor.ServiceDescriptorProto `json:"service"`
|
||||||
Environment []string `json:"environment"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewGenericServiceTemplateBasedEncoder(templateDir string, service *descriptor.ServiceDescriptorProto, file *descriptor.FileDescriptorProto, debug bool, destinationDir string) (e *GenericTemplateBasedEncoder) {
|
func NewGenericServiceTemplateBasedEncoder(templateDir string, service *descriptor.ServiceDescriptorProto, file *descriptor.FileDescriptorProto, debug bool, destinationDir string) (e *GenericTemplateBasedEncoder) {
|
||||||
@ -117,7 +116,6 @@ func (e *GenericTemplateBasedEncoder) genAst(templateFilename string) (*Ast, err
|
|||||||
DestinationDir: e.destinationDir,
|
DestinationDir: e.destinationDir,
|
||||||
RawFilename: templateFilename,
|
RawFilename: templateFilename,
|
||||||
Filename: "",
|
Filename: "",
|
||||||
Environment: os.Environ(),
|
|
||||||
Service: e.service,
|
Service: e.service,
|
||||||
}
|
}
|
||||||
buffer := new(bytes.Buffer)
|
buffer := new(bytes.Buffer)
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
{
|
{
|
||||||
"build-date": "2017-03-31T17:59:35.936239356+02:00",
|
"build-date": "2017-05-02T11:50:25.063291628+02:00",
|
||||||
"build-hostname": "Valerios-MacBook-Pro.local",
|
"build-hostname": "manfred-spacegray.local",
|
||||||
"build-user": "vgheri",
|
"build-user": "moul",
|
||||||
"go-pwd": "github.com/moul/protoc-gen-gotemplate/examples/dummy",
|
"pwd": "/Users/moul/Git/moul/protoc-gen-gotemplate/examples/dummy",
|
||||||
"pwd": "/Users/vgheri/go/src/github.com/moul/protoc-gen-gotemplate/examples/dummy",
|
|
||||||
"debug": false,
|
"debug": false,
|
||||||
"destination-dir": ".",
|
"destination-dir": ".",
|
||||||
"file": {
|
"file": {
|
||||||
@ -840,29 +839,5 @@
|
|||||||
"options": {}
|
"options": {}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
"environment": [
|
|
||||||
"TERM_PROGRAM=platformio-ide-terminal",
|
|
||||||
"TERM=xterm-256color",
|
|
||||||
"SHELL=/bin/bash",
|
|
||||||
"MAKEFLAGS=",
|
|
||||||
"TMPDIR=/var/folders/9v/4b6h7ftd5ldfqv7gr82mbj340000gn/T/",
|
|
||||||
"Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.Zt6NPL5gZZ/Render",
|
|
||||||
"USER=vgheri",
|
|
||||||
"SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.UvxCW75B4v/Listeners",
|
|
||||||
"__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0",
|
|
||||||
"MAKELEVEL=2",
|
|
||||||
"MFLAGS=",
|
|
||||||
"PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/usr/local/go/bin:/usr/local/protoc/bin:/Users/vgheri/go/bin:/usr/local/protoc/bin:/Users/vgheri/go/bin",
|
|
||||||
"_=/usr/local/protoc/bin/protoc",
|
|
||||||
"PWD=/Users/vgheri/go/src/github.com/moul/protoc-gen-gotemplate/examples/dummy",
|
|
||||||
"LANG=en_US.UTF-8",
|
|
||||||
"XPC_FLAGS=0x0",
|
|
||||||
"XPC_SERVICE_NAME=0",
|
|
||||||
"HISTCONTROL=ignoreboth:erasedups",
|
|
||||||
"SHLVL=15",
|
|
||||||
"HOME=/Users/vgheri",
|
|
||||||
"LOGNAME=vgheri",
|
|
||||||
"GOPATH=/Users/vgheri/go"
|
|
||||||
]
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user