Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Linter to Revive #779

Merged
merged 4 commits into from
Aug 22, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ linters:
- goimports
- misspell
- govet
- golint
- revive
- ineffassign
- gosimple
- deadcode
Expand All @@ -26,7 +26,7 @@ issues:
# Exclude linters from running on auto-generated files.
- path: pkg/client
linters:
- golint
- revive
- deadcode

service:
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/minio.min.io/v1/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ func (t *Tenant) MinIOHeadlessServiceHost() string {
// KESHosts returns the host names created for current KES StatefulSet
func (t *Tenant) KESHosts() []string {
hosts := make([]string, 0)
var i int32 = 0
var i int32
for i < t.Spec.KES.Replicas {
hosts = append(hosts, fmt.Sprintf("%s-"+strconv.Itoa(int(i))+".%s.%s.svc.%s", t.KESStatefulSetName(), t.KESHLServiceName(), t.Namespace, ClusterDomain))
i++
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/minio.min.io/v2/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ func (t *Tenant) MinIOHeadlessServiceHost() string {
// KESHosts returns the host names created for current KES StatefulSet
func (t *Tenant) KESHosts() []string {
hosts := make([]string, 0)
var i int32 = 0
var i int32
for i < t.Spec.KES.Replicas {
hosts = append(hosts, fmt.Sprintf("%s-"+strconv.Itoa(int(i))+".%s.%s.svc.%s", t.KESStatefulSetName(), t.KESHLServiceName(), t.Namespace, GetClusterDomain()))
i++
Expand Down
4 changes: 2 additions & 2 deletions pkg/resources/servicemonitor/prometheus-service-monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (

// NewForPrometheus creates a new Prometheus ServiceMonitor for prometheus metrics
func NewForPrometheus(t *miniov2.Tenant) *promv1.ServiceMonitor {
var port string = miniov2.MinIOServiceHTTPPortName
var scheme string = "http"
port := miniov2.MinIOServiceHTTPPortName
scheme := "http"
if t.TLS() {
port = miniov2.MinIOServiceHTTPSPortName
scheme = "https"
Expand Down
2 changes: 1 addition & 1 deletion pkg/resources/services/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func NewClusterIPForConsole(t *miniov2.Tenant) *corev1.Service {
// ServiceForBucket will return a external name based service
func ServiceForBucket(t *miniov2.Tenant, bucket string) *corev1.Service {
var port int32 = miniov2.MinIOPortLoadBalancerSVC
var name string = miniov2.MinIOServiceHTTPPortName
name := miniov2.MinIOServiceHTTPPortName
if t.TLS() {
port = miniov2.MinIOTLSPortLoadBalancerSVC
name = miniov2.MinIOServiceHTTPSPortName
Expand Down