Skip to content

Commit

Permalink
Run gofmt to simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
film42 committed May 7, 2017
1 parent c391f53 commit 84a6f87
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func TestInvalidConfigFormat(t *testing.T) {

func TestConfigInavlidUsername(t *testing.T) {
sampleConfig := &Config{
Credentials: []Credential{Credential{Username: "", Password: "test"}},
Credentials: []Credential{{Username: "", Password: "test"}},
}

if sampleConfig.Validate() != InvalidCredentials {
Expand All @@ -63,7 +63,7 @@ func TestConfigInavlidUsername(t *testing.T) {

func TestConfigInavlidPassword(t *testing.T) {
sampleConfig := &Config{
Credentials: []Credential{Credential{Username: "test", Password: ""}},
Credentials: []Credential{{Username: "test", Password: ""}},
}

if sampleConfig.Validate() != InvalidCredentials {
Expand Down
2 changes: 1 addition & 1 deletion connection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func resetCredentials() {
}

func setCredentials(user, pass string) {
config.Credentials = []Credential{Credential{Username: user, Password: pass}}
config.Credentials = []Credential{{Username: user, Password: pass}}
}

func basicHttpProxyRequest() string {
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func main() {

if *usernamePtr != "" {
config.Credentials = []Credential{
Credential{Username: *usernamePtr, Password: *passwordPtr},
{Username: *usernamePtr, Password: *passwordPtr},
}
}
}
Expand Down

0 comments on commit 84a6f87

Please sign in to comment.