Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uses go1.16 by default #33

Merged
merged 2 commits into from
Feb 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions config.reference.json

This file was deleted.

1 change: 1 addition & 0 deletions config.reference.json
39 changes: 5 additions & 34 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@
package config

import (
"embed"
"encoding/json"

"go.amplifyedge.org/booty-v2/internal/logging"
)

//go:embed config.reference.json

var DefaultConfig embed.FS

type BinaryInfo struct {
Name string `json:"name"`
Version string `json:"version"`
Expand All @@ -34,37 +39,3 @@ func (ac *AppConfig) GetVersion(pkgName string) string {
}
return ""
}

var DefaultConfig = AppConfig{
DevMode: true,
Binaries: []BinaryInfo{
{
Name: "grafana",
Version: "7.4.0",
},
{
Name: "goreleaser",
Version: "0.155.1",
},
{
Name: "caddy",
Version: "2.3.0",
},
{
Name: "protoc",
Version: "3.14.0",
},
{
Name: "protoc-gen-go",
Version: "1.25.0",
},
{
Name: "protoc-gen-cobra",
Version: "0.4.1",
},
{
Name: "protoc-gen-go-grpc",
Version: "1.1.0",
},
},
}
33 changes: 33 additions & 0 deletions config/config.reference.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"dev": true,
"binaries": [
{
"name": "grafana",
"version": "7.4.0"
},
{
"name": "goreleaser",
"version": "0.155.1"
},
{
"name": "caddy",
"version": "2.3.0"
},
{
"name": "protoc",
"version": "3.14.0"
},
{
"name": "protoc-gen-go",
"version": "1.25.0"
},
{
"name": "protoc-gen-cobra",
"version": "0.4.1"
},
{
"name": "protoc-gen-go-grpc",
"version": "1.1.0"
}
]
}
3 changes: 1 addition & 2 deletions dep/orchestrator/orchestrate.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package orchestrator

import (
"encoding/json"
"github.com/spf13/cobra"
"io/ioutil"
"path/filepath"
Expand Down Expand Up @@ -40,7 +39,7 @@ func NewOrchestrator(app string) *Orchestrator {
fileContent, err := ioutil.ReadFile(configPath)
if err != nil {
// use default config
fileContent, err = json.Marshal(&config.DefaultConfig)
fileContent, err = config.DefaultConfig.ReadFile("config.reference.json")
if err != nil {
logger.Fatalf("error encoding default json config")
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.amplifyedge.org/booty-v2

go 1.15
go 1.16

require (
github.com/cheggaaa/pb v1.0.27
Expand Down
1 change: 0 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn
github.com/otiai10/copy v1.4.2 h1:RTiz2sol3eoXPLF4o+YWqEybwfUa/Q2Nkc4ZIUs3fwI=
github.com/otiai10/copy v1.4.2/go.mod h1:XWfuS3CrI0R6IE0FbgHsEazaXO8G0LpMp9o8tos0x4E=
github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE=
github.com/otiai10/curr v1.0.0 h1:TJIWdbX0B+kpNagQrjgq8bCMrbhiuX73M2XwgtDMoOI=
github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs=
github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo=
github.com/otiai10/mint v1.3.2 h1:VYWnrP5fXmz1MXvjuUvcBrXSjGE6xjON+axB/UrpO3E=
Expand Down