Skip to content

Commit dccd6c5

Browse files
committed
Fix headers and linters
Signed-off-by: Ricardo Zanini <[email protected]>
1 parent 3bb7615 commit dccd6c5

16 files changed

+60
-18
lines changed

impl/ctx/context.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ import (
1919
"encoding/json"
2020
"errors"
2121
"fmt"
22-
"github.com/google/uuid"
23-
"github.com/serverlessworkflow/sdk-go/v3/model"
2422
"sync"
2523
"time"
24+
25+
"github.com/google/uuid"
26+
"github.com/serverlessworkflow/sdk-go/v3/model"
2627
)
2728

2829
var ErrWorkflowContextNotFound = errors.New("workflow context not found")

impl/expr/expr.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
"context"
1919
"errors"
2020
"fmt"
21+
2122
"github.com/itchyny/gojq"
2223
"github.com/serverlessworkflow/sdk-go/v3/impl/ctx"
2324
"github.com/serverlessworkflow/sdk-go/v3/model"

impl/json_pointer.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ package impl
1717
import (
1818
"encoding/json"
1919
"fmt"
20-
"github.com/serverlessworkflow/sdk-go/v3/model"
2120
"reflect"
2221
"strings"
22+
23+
"github.com/serverlessworkflow/sdk-go/v3/model"
2324
)
2425

2526
func findJsonPointer(data interface{}, target string, path string) (string, bool) {

impl/json_pointer_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
package impl
1616

1717
import (
18+
"testing"
19+
1820
"github.com/serverlessworkflow/sdk-go/v3/model"
1921
"github.com/stretchr/testify/assert"
20-
"testing"
2122
)
2223

2324
// TestGenerateJSONPointer_SimpleTask tests a simple workflow task.
@@ -60,8 +61,8 @@ func TestGenerateJSONPointer_ForkTask(t *testing.T) {
6061
Fork: model.ForkTaskConfiguration{
6162
Compete: true,
6263
Branches: &model.TaskList{
63-
{Key: "callNurse", Task: &model.CallHTTP{Call: "http", With: model.HTTPArguments{Method: "put", Endpoint: model.NewEndpoint("https://hospital.com/api/alert/nurses")}}},
64-
{Key: "callDoctor", Task: &model.CallHTTP{Call: "http", With: model.HTTPArguments{Method: "put", Endpoint: model.NewEndpoint("https://hospital.com/api/alert/doctor")}}},
64+
&model.TaskItem{Key: "callNurse", Task: &model.CallHTTP{Call: "http", With: model.HTTPArguments{Method: "put", Endpoint: model.NewEndpoint("https://hospital.com/api/alert/nurses")}}},
65+
&model.TaskItem{Key: "callDoctor", Task: &model.CallHTTP{Call: "http", With: model.HTTPArguments{Method: "put", Endpoint: model.NewEndpoint("https://hospital.com/api/alert/doctor")}}},
6566
},
6667
},
6768
},
@@ -85,12 +86,12 @@ func TestGenerateJSONPointer_DeepNestedTask(t *testing.T) {
8586
Fork: model.ForkTaskConfiguration{
8687
Compete: false,
8788
Branches: &model.TaskList{
88-
{
89+
&model.TaskItem{
8990
Key: "branchA",
9091
Task: &model.ForkTask{
9192
Fork: model.ForkTaskConfiguration{
9293
Branches: &model.TaskList{
93-
{
94+
&model.TaskItem{
9495
Key: "deepTask",
9596
Task: &model.SetTask{Set: map[string]interface{}{"result": "done"}},
9697
},

impl/runner.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ package impl
1717
import (
1818
"context"
1919
"fmt"
20+
"time"
21+
2022
"github.com/serverlessworkflow/sdk-go/v3/impl/ctx"
2123
"github.com/serverlessworkflow/sdk-go/v3/model"
22-
"time"
2324
)
2425

2526
var _ WorkflowRunner = &workflowRunnerImpl{}

impl/runner_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ package impl
1717
import (
1818
"context"
1919
"fmt"
20+
"os"
21+
"path/filepath"
22+
"testing"
23+
2024
"github.com/serverlessworkflow/sdk-go/v3/impl/ctx"
2125
"github.com/serverlessworkflow/sdk-go/v3/model"
2226
"github.com/serverlessworkflow/sdk-go/v3/parser"
2327
"github.com/stretchr/testify/assert"
24-
"os"
25-
"path/filepath"
26-
"testing"
2728
)
2829

2930
type taskSupportOpts func(*workflowRunnerImpl)

impl/task_runner.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ package impl
1616

1717
import (
1818
"context"
19+
"time"
20+
1921
"github.com/serverlessworkflow/sdk-go/v3/impl/ctx"
2022
"github.com/serverlessworkflow/sdk-go/v3/model"
21-
"time"
2223
)
2324

2425
var _ TaskRunner = &SetTaskRunner{}

impl/task_runner_do.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ package impl
1616

1717
import (
1818
"fmt"
19+
"time"
20+
1921
"github.com/serverlessworkflow/sdk-go/v3/impl/ctx"
2022
"github.com/serverlessworkflow/sdk-go/v3/model"
21-
"time"
2223
)
2324

2425
// NewTaskRunner creates a TaskRunner instance based on the task type.

impl/task_runner_for.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ package impl
1616

1717
import (
1818
"fmt"
19-
"github.com/serverlessworkflow/sdk-go/v3/impl/expr"
20-
"github.com/serverlessworkflow/sdk-go/v3/model"
2119
"reflect"
2220
"strings"
21+
22+
"github.com/serverlessworkflow/sdk-go/v3/impl/expr"
23+
"github.com/serverlessworkflow/sdk-go/v3/model"
2324
)
2425

2526
const (

impl/task_runner_raise.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ package impl
1616

1717
import (
1818
"fmt"
19+
1920
"github.com/serverlessworkflow/sdk-go/v3/model"
2021
)
2122

0 commit comments

Comments
 (0)