Skip to content

Commit 0bdd1ca

Browse files
committed
update editorconfig and codestyle
Signed-off-by: Markus Blaschke <mblaschke82@gmail.com>
1 parent 7e66420 commit 0bdd1ca

File tree

7 files changed

+55
-22
lines changed

7 files changed

+55
-22
lines changed

.editorconfig

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,38 @@ indent_size = 4
1414
[Makefile]
1515
indent_style = tab
1616

17-
[*.yml]
18-
indent_size = 2
19-
20-
[*.yaml]
17+
[{*.yml, *.yaml}]
2118
indent_size = 2
2219

2320
[*.conf]
2421
indent_size = 2
2522

2623
[*.go]
27-
indent_style = tab
2824
indent_size = 4
25+
indent_style = tab
26+
ij_continuation_indent_size = 4
27+
ij_go_GROUP_CURRENT_PROJECT_IMPORTS = true
28+
ij_go_add_leading_space_to_comments = true
29+
ij_go_add_parentheses_for_single_import = true
30+
ij_go_call_parameters_new_line_after_left_paren = true
31+
ij_go_call_parameters_right_paren_on_new_line = true
32+
ij_go_call_parameters_wrap = off
33+
ij_go_fill_paragraph_width = 80
34+
ij_go_group_stdlib_imports = true
35+
ij_go_import_sorting = goimports
36+
ij_go_keep_indents_on_empty_lines = false
37+
ij_go_local_group_mode = project
38+
ij_go_move_all_imports_in_one_declaration = true
39+
ij_go_move_all_stdlib_imports_in_one_group = true
40+
ij_go_remove_redundant_import_aliases = false
41+
ij_go_run_go_fmt_on_reformat = true
42+
ij_go_use_back_quotes_for_imports = false
43+
ij_go_wrap_comp_lit = off
44+
ij_go_wrap_comp_lit_newline_after_lbrace = true
45+
ij_go_wrap_comp_lit_newline_before_rbrace = true
46+
ij_go_wrap_func_params = off
47+
ij_go_wrap_func_params_newline_after_lparen = true
48+
ij_go_wrap_func_params_newline_before_rparen = true
49+
ij_go_wrap_func_result = off
50+
ij_go_wrap_func_result_newline_after_lparen = true
51+
ij_go_wrap_func_result_newline_before_rparen = true

bootstraptoken/token.go

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

33
import (
44
"fmt"
5-
"github.com/Azure/go-autorest/autorest/date"
65
"strings"
76
"time"
7+
8+
"github.com/Azure/go-autorest/autorest/date"
89
)
910

1011
type (

cloudprovider/azure.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,20 @@ package cloudprovider
33
import (
44
"context"
55
"fmt"
6+
"os"
7+
"regexp"
8+
"time"
9+
610
"github.com/Azure/azure-sdk-for-go/services/keyvault/2016-10-01/keyvault"
711
"github.com/Azure/go-autorest/autorest"
812
"github.com/Azure/go-autorest/autorest/azure"
913
"github.com/Azure/go-autorest/autorest/azure/auth"
1014
"github.com/Azure/go-autorest/autorest/date"
1115
log "github.com/sirupsen/logrus"
1216
"github.com/webdevops/go-prometheus-common/azuretracing"
17+
1318
"github.com/webdevops/kube-bootstrap-token-manager/bootstraptoken"
1419
"github.com/webdevops/kube-bootstrap-token-manager/config"
15-
"os"
16-
"regexp"
17-
"time"
1820
)
1921

2022
type (

cloudprovider/base.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ package cloudprovider
22

33
import (
44
"context"
5+
56
log "github.com/sirupsen/logrus"
7+
68
"github.com/webdevops/kube-bootstrap-token-manager/bootstraptoken"
79
"github.com/webdevops/kube-bootstrap-token-manager/config"
810
)

config/opts.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ package config
22

33
import (
44
"encoding/json"
5-
log "github.com/sirupsen/logrus"
65
"time"
6+
7+
log "github.com/sirupsen/logrus"
78
)
89

910
type (

main.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,19 @@ package main
22

33
import (
44
"fmt"
5+
"net/http"
6+
"os"
7+
"path"
8+
"runtime"
9+
"strings"
10+
511
"github.com/jessevdk/go-flags"
612
"github.com/prometheus/client_golang/prometheus/promhttp"
713
log "github.com/sirupsen/logrus"
814
"github.com/webdevops/go-prometheus-common/azuretracing"
15+
916
"github.com/webdevops/kube-bootstrap-token-manager/config"
1017
"github.com/webdevops/kube-bootstrap-token-manager/manager"
11-
"net/http"
12-
"os"
13-
"path"
14-
"runtime"
15-
"strings"
1618
)
1719

1820
const (

manager/manager.go

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ import (
55
"context"
66
"crypto/rand"
77
"fmt"
8+
"math/big"
9+
"os"
10+
"text/template"
11+
"time"
12+
813
"github.com/prometheus/client_golang/prometheus"
914
log "github.com/sirupsen/logrus"
10-
"github.com/webdevops/kube-bootstrap-token-manager/bootstraptoken"
11-
"github.com/webdevops/kube-bootstrap-token-manager/cloudprovider"
12-
"github.com/webdevops/kube-bootstrap-token-manager/config"
1315
corev1 "k8s.io/api/core/v1"
1416
"k8s.io/apimachinery/pkg/api/errors"
1517
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -18,10 +20,10 @@ import (
1820
"k8s.io/client-go/rest"
1921
"k8s.io/client-go/tools/clientcmd"
2022
"k8s.io/client-go/util/retry"
21-
"math/big"
22-
"os"
23-
"text/template"
24-
"time"
23+
24+
"github.com/webdevops/kube-bootstrap-token-manager/bootstraptoken"
25+
"github.com/webdevops/kube-bootstrap-token-manager/cloudprovider"
26+
"github.com/webdevops/kube-bootstrap-token-manager/config"
2527
)
2628

2729
type (

0 commit comments

Comments
 (0)