You've already forked woodpecker
mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-11-23 21:44:44 +02:00
cspell lint go code (#3706)
This commit is contained in:
@@ -22,8 +22,8 @@ import (
|
||||
"github.com/rs/zerolog/log"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
int_str "k8s.io/apimachinery/pkg/util/intstr"
|
||||
|
||||
"go.woodpecker-ci.org/woodpecker/v2/pipeline/backend/types"
|
||||
)
|
||||
@@ -50,7 +50,7 @@ func mkService(step *types.Step, config *config) (*v1.Service, error) {
|
||||
|
||||
log.Trace().Str("name", name).Interface("selector", selector).Interface("ports", svcPorts).Msg("creating service")
|
||||
return &v1.Service{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
ObjectMeta: meta_v1.ObjectMeta{
|
||||
Name: name,
|
||||
Namespace: config.Namespace,
|
||||
},
|
||||
@@ -73,7 +73,7 @@ func servicePort(port types.Port) v1.ServicePort {
|
||||
Name: fmt.Sprintf("port-%d", portNumber),
|
||||
Port: portNumber,
|
||||
Protocol: v1.Protocol(portProtocol),
|
||||
TargetPort: intstr.IntOrString{IntVal: portNumber},
|
||||
TargetPort: int_str.IntOrString{IntVal: portNumber},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,10 +85,10 @@ func startService(ctx context.Context, engine *kube, step *types.Step) (*v1.Serv
|
||||
}
|
||||
|
||||
log.Trace().Str("name", svc.Name).Interface("selector", svc.Spec.Selector).Interface("ports", svc.Spec.Ports).Msg("creating service")
|
||||
return engine.client.CoreV1().Services(engineConfig.Namespace).Create(ctx, svc, metav1.CreateOptions{})
|
||||
return engine.client.CoreV1().Services(engineConfig.Namespace).Create(ctx, svc, meta_v1.CreateOptions{})
|
||||
}
|
||||
|
||||
func stopService(ctx context.Context, engine *kube, step *types.Step, deleteOpts metav1.DeleteOptions) error {
|
||||
func stopService(ctx context.Context, engine *kube, step *types.Step, deleteOpts meta_v1.DeleteOptions) error {
|
||||
svcName, err := serviceName(step)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user