Add godot linter to harmonitze toplevel comments (#3650)

This commit is contained in:
Robert Kaussow
2024-05-13 22:58:21 +02:00
committed by GitHub
parent 83eba294c7
commit 89e100cfd1
144 changed files with 302 additions and 302 deletions

View File

@@ -40,7 +40,7 @@ func NewAuthGrpcClient(conn *grpc.ClientConn, agentToken string, agentID int64)
}
func (c *AuthClient) Auth() (string, int64, error) {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) //nolint: gomnd
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) //nolint:mnd
defer cancel()
req := &proto.AuthRequest{

View File

@@ -23,13 +23,13 @@ import (
"google.golang.org/grpc/metadata"
)
// AuthInterceptor is a client interceptor for authentication
// AuthInterceptor is a client interceptor for authentication.
type AuthInterceptor struct {
authClient *AuthClient
accessToken string
}
// NewAuthInterceptor returns a new auth interceptor
// NewAuthInterceptor returns a new auth interceptor.
func NewAuthInterceptor(
authClient *AuthClient,
refreshDuration time.Duration,
@@ -46,7 +46,7 @@ func NewAuthInterceptor(
return interceptor, nil
}
// Unary returns a client interceptor to authenticate unary RPC
// Unary returns a client interceptor to authenticate unary RPC.
func (interceptor *AuthInterceptor) Unary() grpc.UnaryClientInterceptor {
return func(
ctx context.Context,
@@ -60,7 +60,7 @@ func (interceptor *AuthInterceptor) Unary() grpc.UnaryClientInterceptor {
}
}
// Stream returns a client interceptor to authenticate stream RPC
// Stream returns a client interceptor to authenticate stream RPC.
func (interceptor *AuthInterceptor) Stream() grpc.StreamClientInterceptor {
return func(
ctx context.Context,

View File

@@ -31,7 +31,7 @@ import (
"go.woodpecker-ci.org/woodpecker/v2/pipeline/rpc/proto"
)
// set grpc version on compile time to compare against server version response
// Set grpc version on compile time to compare against server version response.
const ClientGrpcVersion int32 = proto.Version
type client struct {
@@ -54,12 +54,12 @@ func (c *client) Close() error {
func (c *client) newBackOff() backoff.BackOff {
b := backoff.NewExponentialBackOff()
b.MaxElapsedTime = 0
b.MaxInterval = 10 * time.Second //nolint: gomnd
b.InitialInterval = 10 * time.Millisecond //nolint: gomnd
b.MaxInterval = 10 * time.Second //nolint:mnd
b.InitialInterval = 10 * time.Millisecond //nolint:mnd
return b
}
// Version returns the server- & grpc-version
// Version returns the server- & grpc-version.
func (c *client) Version(ctx context.Context) (*rpc.Version, error) {
res, err := c.client.Version(ctx, &proto.Empty{})
if err != nil {
@@ -242,7 +242,7 @@ func (c *client) Done(ctx context.Context, id string, state rpc.State) (err erro
return nil
}
// Extend extends the workflow deadline
// Extend extends the workflow deadline.
func (c *client) Extend(ctx context.Context, id string) (err error) {
retry := c.newBackOff()
req := new(proto.ExtendRequest)