Skip to content

Commit

Permalink
Minor: make slice declarations idiomatic (#221)
Browse files Browse the repository at this point in the history
* Update TODO

* Minor: command help output formatting (#200)

Fix help output formatting for various commands.

* WIP: allow kubernetes Secrets to be injected into the worker's environment (#189)

Allow kubernetes Secrets to be injected into the worker's environment (#189)

* Rename config.IsDefined to simply config.Defined (#206)

* Fix for Postgres connection leak bug (#208)

* Fix for database creation bug (#183)

* Ignore VS Code workspaces

* Oops

* Minor: make slice definitions idiomatic

* Restore one declaration to prevent nil returns

Co-authored-by: Matthew Titmus <mtitmus@yext.com>
Co-authored-by: Matt Miller <msm93v2@gmail.com>
  • Loading branch information
3 people authored Jul 2, 2022
1 parent 3d5426c commit 40ce93b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cli/columnizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (c *Columnizer) Format(o interface{}) []string {
headerFormat := fmt.Sprintf(headers.String(), columnWidths...)
metaFormat := fmt.Sprintf(meta.String(), columnWidths...)

lines := []string{}
var lines []string
lines = append(lines, fmt.Sprintf(headerFormat, columnNames...))

for row := 0; row < length; row++ {
Expand Down
2 changes: 1 addition & 1 deletion cli/hidden-command.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func listAllCommands(gortClient *client.GortClient) error {

fmt.Printf("I know about these commands:\n\n")

cmds := []string{}
var cmds []string

for _, b := range bundles {
if !b.Enabled {
Expand Down
6 changes: 3 additions & 3 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ import (
"sync"
"time"

log "github.com/sirupsen/logrus"
"gopkg.in/yaml.v3"

"github.com/getgort/gort/data"
gerrs "github.com/getgort/gort/errors"

log "github.com/sirupsen/logrus"
"gopkg.in/yaml.v3"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion worker/docker/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func (w *ContainerWorker) Stopped() <-chan int64 {
}

func (w *ContainerWorker) envVars() []string {
env := []string{}
var env []string

for k, v := range w.configs {
env = append(env, fmt.Sprintf("%s=%s", k, v))
Expand Down

0 comments on commit 40ce93b

Please sign in to comment.