Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
chantu.lhl committed Oct 25, 2021
1 parent a94b637 commit 3e8caf8
Show file tree
Hide file tree
Showing 46 changed files with 87 additions and 133 deletions.
3 changes: 1 addition & 2 deletions define/constant.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
*Copyright (c) 2019-2021, Alibaba Group Holding Limited;
*Licensed under the Apache License, Version 2.0 (the "License");
*you may not use this file except in compliance with the License.
Expand All @@ -13,7 +13,6 @@
*limitations under the License.
*/


package define

type WFConfKey string
Expand Down
3 changes: 1 addition & 2 deletions define/state_error.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
*Copyright (c) 2019-2021, Alibaba Group Holding Limited;
*Licensed under the Apache License, Version 2.0 (the "License");
*you may not use this file except in compliance with the License.
Expand All @@ -13,7 +13,6 @@
*limitations under the License.
*/


package define

import (
Expand Down
3 changes: 1 addition & 2 deletions implement/resource_k8s.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
*Copyright (c) 2019-2021, Alibaba Group Holding Limited;
*Licensed under the Apache License, Version 2.0 (the "License");
*you may not use this file except in compliance with the License.
Expand All @@ -13,7 +13,6 @@
*limitations under the License.
*/


package implement

import (
Expand Down
5 changes: 2 additions & 3 deletions implement/wfengine/wf_history_recorder_k8s.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
*Copyright (c) 2019-2021, Alibaba Group Holding Limited;
*Licensed under the Apache License, Version 2.0 (the "License");
*you may not use this file except in compliance with the License.
Expand All @@ -13,7 +13,6 @@
*limitations under the License.
*/


package implement_wfengine

import (
Expand All @@ -26,9 +25,9 @@ import (
"sync"
"time"

"github.com/ApsaraDB/PolarDB-Stack-Workflow/wfengine"
"github.com/go-logr/logr"
"github.com/sirupsen/logrus"
"github.com/ApsaraDB/PolarDB-Stack-Workflow/wfengine"
)

type StepType string
Expand Down
3 changes: 1 addition & 2 deletions implement/wfengine/wf_hook_k8s.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
*Copyright (c) 2019-2021, Alibaba Group Holding Limited;
*Licensed under the Apache License, Version 2.0 (the "License");
*you may not use this file except in compliance with the License.
Expand All @@ -13,7 +13,6 @@
*limitations under the License.
*/


package implement_wfengine

import (
Expand Down
5 changes: 2 additions & 3 deletions implement/wfengine/wf_meta_loader_k8s.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
*Copyright (c) 2019-2021, Alibaba Group Holding Limited;
*Licensed under the Apache License, Version 2.0 (the "License");
*you may not use this file except in compliance with the License.
Expand All @@ -13,7 +13,6 @@
*limitations under the License.
*/


package implement_wfengine

import (
Expand All @@ -22,9 +21,9 @@ import (
"path/filepath"
"strings"

"github.com/ApsaraDB/PolarDB-Stack-Workflow/wfengine"
"github.com/go-logr/logr"
"github.com/pkg/errors"
"github.com/ApsaraDB/PolarDB-Stack-Workflow/wfengine"
"gopkg.in/yaml.v2"
"k8s.io/klog/klogr"
)
Expand Down
3 changes: 1 addition & 2 deletions implement/wfengine/wf_recover_k8s.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
*Copyright (c) 2019-2021, Alibaba Group Holding Limited;
*Licensed under the Apache License, Version 2.0 (the "License");
*you may not use this file except in compliance with the License.
Expand All @@ -13,7 +13,6 @@
*limitations under the License.
*/


package implement_wfengine

import (
Expand Down
5 changes: 2 additions & 3 deletions implement/wfengine/wf_runtime_memento_storage_k8s.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
*Copyright (c) 2019-2021, Alibaba Group Holding Limited;
*Licensed under the Apache License, Version 2.0 (the "License");
*you may not use this file except in compliance with the License.
Expand All @@ -13,15 +13,14 @@
*limitations under the License.
*/


package implement_wfengine

import (
"github.com/pkg/errors"
"github.com/ApsaraDB/PolarDB-Stack-Workflow/implement"
"github.com/ApsaraDB/PolarDB-Stack-Workflow/statemachine"
"github.com/ApsaraDB/PolarDB-Stack-Workflow/utils/k8sutil"
"github.com/ApsaraDB/PolarDB-Stack-Workflow/wfengine"
"github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
3 changes: 1 addition & 2 deletions statemachine/event.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
*Copyright (c) 2019-2021, Alibaba Group Holding Limited;
*Licensed under the Apache License, Version 2.0 (the "License");
*you may not use this file except in compliance with the License.
Expand All @@ -13,7 +13,6 @@
*limitations under the License.
*/


package statemachine

type EventName string
Expand Down
3 changes: 1 addition & 2 deletions statemachine/lock.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
*Copyright (c) 2019-2021, Alibaba Group Holding Limited;
*Licensed under the Apache License, Version 2.0 (the "License");
*you may not use this file except in compliance with the License.
Expand All @@ -13,7 +13,6 @@
*limitations under the License.
*/


package statemachine

import (
Expand Down
3 changes: 1 addition & 2 deletions statemachine/stable_state.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
*Copyright (c) 2019-2021, Alibaba Group Holding Limited;
*Licensed under the Apache License, Version 2.0 (the "License");
*you may not use this file except in compliance with the License.
Expand All @@ -13,7 +13,6 @@
*limitations under the License.
*/


package statemachine

import "fmt"
Expand Down
5 changes: 2 additions & 3 deletions statemachine/statemachine.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
*Copyright (c) 2019-2021, Alibaba Group Holding Limited;
*Licensed under the Apache License, Version 2.0 (the "License");
*you may not use this file except in compliance with the License.
Expand All @@ -13,15 +13,14 @@
*limitations under the License.
*/


package statemachine

import (
"errors"
"fmt"

"github.com/go-logr/logr"
"github.com/ApsaraDB/PolarDB-Stack-Workflow/utils"
"github.com/go-logr/logr"
"k8s.io/klog/klogr"
)

Expand Down
5 changes: 2 additions & 3 deletions test/dbclusterwf/db_cluster_resource.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
*Copyright (c) 2019-2021, Alibaba Group Holding Limited;
*Licensed under the Apache License, Version 2.0 (the "License");
*you may not use this file except in compliance with the License.
Expand All @@ -13,14 +13,13 @@
*limitations under the License.
*/


package dbclusterwf

import (
"github.com/go-logr/logr"
"github.com/ApsaraDB/PolarDB-Stack-Workflow/implement"
"github.com/ApsaraDB/PolarDB-Stack-Workflow/statemachine"
"github.com/ApsaraDB/PolarDB-Stack-Workflow/utils/k8sutil"
"github.com/go-logr/logr"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/kubernetes/scheme"
Expand Down
5 changes: 2 additions & 3 deletions test/dbclusterwf/wfImplement.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
*Copyright (c) 2019-2021, Alibaba Group Holding Limited;
*Licensed under the Apache License, Version 2.0 (the "License");
*you may not use this file except in compliance with the License.
Expand All @@ -13,20 +13,19 @@
*limitations under the License.
*/


package dbclusterwf

import (
"context"
"fmt"
"sync"

"github.com/go-logr/logr"
"github.com/ApsaraDB/PolarDB-Stack-Workflow/define"
wfengineimpl "github.com/ApsaraDB/PolarDB-Stack-Workflow/implement/wfengine"
"github.com/ApsaraDB/PolarDB-Stack-Workflow/statemachine"
"github.com/ApsaraDB/PolarDB-Stack-Workflow/utils/k8sutil"
"github.com/ApsaraDB/PolarDB-Stack-Workflow/wfengine"
"github.com/go-logr/logr"
corev1 "k8s.io/api/core/v1"
)

Expand Down
7 changes: 3 additions & 4 deletions test/init.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
*Copyright (c) 2019-2021, Alibaba Group Holding Limited;
*Licensed under the Apache License, Version 2.0 (the "License");
*you may not use this file except in compliance with the License.
Expand All @@ -13,7 +13,6 @@
*limitations under the License.
*/


package test

import (
Expand All @@ -25,10 +24,10 @@ import (
r "runtime"
"testing"

. "github.com/bouk/monkey"
. "github.com/golang/mock/gomock"
"github.com/ApsaraDB/PolarDB-Stack-Workflow/test/mock"
"github.com/ApsaraDB/PolarDB-Stack-Workflow/utils/k8sutil"
. "github.com/bouk/monkey"
. "github.com/golang/mock/gomock"
apicorev1 "k8s.io/api/core/v1"
k8sFake "k8s.io/client-go/kubernetes/fake"
"k8s.io/client-go/kubernetes/scheme"
Expand Down
3 changes: 1 addition & 2 deletions test/integrationtest/main.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
*Copyright (c) 2019-2021, Alibaba Group Holding Limited;
*Licensed under the Apache License, Version 2.0 (the "License");
*you may not use this file except in compliance with the License.
Expand All @@ -13,5 +13,4 @@
*limitations under the License.
*/


package integrationtest
5 changes: 2 additions & 3 deletions test/integrationtest/workflow_runtime_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
*Copyright (c) 2019-2021, Alibaba Group Holding Limited;
*Licensed under the Apache License, Version 2.0 (the "License");
*you may not use this file except in compliance with the License.
Expand All @@ -13,20 +13,19 @@
*limitations under the License.
*/


package integrationtest

import (
"context"
"testing"

. "github.com/smartystreets/goconvey/convey"
"github.com/ApsaraDB/PolarDB-Stack-Workflow/implement"
"github.com/ApsaraDB/PolarDB-Stack-Workflow/statemachine"
"github.com/ApsaraDB/PolarDB-Stack-Workflow/test"
"github.com/ApsaraDB/PolarDB-Stack-Workflow/test/dbclusterwf"
"github.com/ApsaraDB/PolarDB-Stack-Workflow/utils/k8sutil"
"github.com/ApsaraDB/PolarDB-Stack-Workflow/wfengine"
. "github.com/smartystreets/goconvey/convey"
"k8s.io/klog/klogr"
)

Expand Down
5 changes: 2 additions & 3 deletions test/mock/statemachine.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions test/mock/wf_hook.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions test/mock/wf_meta_loader.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3e8caf8

Please sign in to comment.