Skip to content

Commit

Permalink
fix: 2024-05-25 12:25:54
Browse files Browse the repository at this point in the history
  • Loading branch information
kooksee committed May 25, 2024
1 parent 5f4b3f7 commit 8368c22
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/protobuild/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package protobuild
import (
"bytes"
"fmt"
"github.com/a8m/envsubst"
"io"
"io/fs"
"os"
Expand All @@ -11,6 +12,7 @@ import (
"strings"
"sync"

_ "github.com/a8m/envsubst"
"github.com/cnf/structhash"
"github.com/pubgo/funk/assert"
"github.com/pubgo/funk/errors"
Expand Down Expand Up @@ -43,6 +45,7 @@ var (

func parseConfig() error {
content := assert.Must1(os.ReadFile(protoCfg))
content = append(assert.Must1(envsubst.Bytes(content)))
assert.Must(yaml.Unmarshal(content, &cfg))

cfg.Vendor = strutil.FirstFnNotEmpty(func() string {
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module github.com/pubgo/protobuild
go 1.19

require (
github.com/a8m/envsubst v1.3.0
github.com/bufbuild/protocompile v0.5.1
github.com/cnf/structhash v0.0.0-20201127153200-e1b16c1ebc08
github.com/dave/jennifer v1.6.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3f
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/a8m/envsubst v1.3.0 h1:GmXKmVssap0YtlU3E230W98RWtWCyIZzjtf1apWWyAg=
github.com/a8m/envsubst v1.3.0/go.mod h1:MVUTQNGQ3tsjOOtKCNd+fl8RzhsXcDvvAEzkhGtlsbY=
github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc=
github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
github.com/antzucaro/matchr v0.0.0-20210222213004-b04723ef80f0 h1:R/qAiUxFT3mNgQaNqJe0IVznjKRNm23ohAIh9lgtlzc=
Expand Down

0 comments on commit 8368c22

Please sign in to comment.