Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bradmiro committed Oct 27, 2023
1 parent a96db1b commit be6fa81
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions infra/blueprint-test/pkg/bq/bq.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import (
)

type CmdCfg struct {
bqBinary string // path to bq binary
commonArgs []string // common arguments to pass to bq calls
logger *logger.Logger // custom logger
bqBinary string // path to bq binary
commonArgs []string // common arguments to pass to bq calls
logger *logger.Logger // custom logger
}

type cmdOption func(*CmdCfg)
Expand Down
4 changes: 2 additions & 2 deletions infra/blueprint-test/pkg/utils/string_formatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

package utils
package utils

import "fmt"
import "fmt"

// StringFromTextAndArgs converts msg and args to formatted text
func StringFromTextAndArgs(msgAndArgs ...interface{}) string {
Expand Down
18 changes: 9 additions & 9 deletions infra/blueprint-test/pkg/utils/string_formatter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,22 @@ import (

func TestStringFromTextAndArgs(t *testing.T) {
tests := []struct {
name string
cmd string
args []interface{}
output string
name string
cmd string
args []interface{}
output string
}{
{
name: "one arg",
cmd: "project list --filter=%s",
args: []interface{}{"TEST_PROJECT"},
output: "project list --filter=TEST_PROJECT",
name: "one arg",
cmd: "project list --filter=%s",
args: []interface{}{"TEST_PROJECT"},
output: "project list --filter=TEST_PROJECT",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
assert := assert.New(t)
funcOut := StringFromTextAndArgs(append([]interface{}{tt.cmd}, tt.args...) ...)
funcOut := StringFromTextAndArgs(append([]interface{}{tt.cmd}, tt.args...)...)
assert.Equal(tt.output, funcOut)
})
}
Expand Down

0 comments on commit be6fa81

Please sign in to comment.