Skip to content

Commit

Permalink
style: refactor codebase for improved consistency and clarity
Browse files Browse the repository at this point in the history
- Reorder imports in `jenkins_test.go` and `plugin_test.go` to move `assert` import to the end
- Remove unnecessary empty line in `plugin.go`

Signed-off-by: appleboy <appleboy.tw@gmail.com>
  • Loading branch information
appleboy committed Oct 4, 2024
1 parent f932a0e commit 4f82250
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions jenkins_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package main

import (
"github.com/stretchr/testify/assert"

"net/url"
"testing"

"github.com/stretchr/testify/assert"
)

func TestParseJobPath(t *testing.T) {
Expand Down
1 change: 0 additions & 1 deletion plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ func trimElement(keys []string) []string {

// Exec executes the plugin.
func (p Plugin) Exec() error {

if len(p.BaseURL) == 0 || len(p.Username) == 0 || len(p.Token) == 0 {
return errors.New("missing jenkins config")
}
Expand Down
4 changes: 2 additions & 2 deletions plugin_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package main

import (
"github.com/stretchr/testify/assert"

"testing"

"github.com/stretchr/testify/assert"
)

func TestMissingConfig(t *testing.T) {
Expand Down

0 comments on commit 4f82250

Please sign in to comment.