build/ci: Update Go to v1.24, golangci-lint to v1.64.6 and fix issues (#1804)

* build/ci: Update Go to v1.24, golangci-lint to v1.64.5 and fix issues

* Address shazbert's nitters

* linter/config: Fix new linter issue and use versionSize const

* Address gk's nitters and fix additional linter issue after rebase

* Address glorious nits

* staticcheck: Fix additional linter issues after upgrading to Go 1.24.1 and golangci-lint v1.64.6

Also addresses nits

* Improve testing, assertify usage and use common.ErrParsingWSField

* TestCreateNewStrategy: Replace must > should wording
This commit is contained in:
Adrian Gallagher
2025-03-10 16:33:55 +11:00
committed by GitHub
parent c086e281cf
commit d64d56f77c
114 changed files with 5080 additions and 9355 deletions

View File

@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc-gen-go-grpc v1.4.0
// - protoc (unknown)
// source: btrpc.proto
@@ -15,8 +15,8 @@ import (
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// Requires gRPC-Go v1.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
const (
BacktesterService_ExecuteStrategyFromFile_FullMethodName = "/btrpc.BacktesterService/ExecuteStrategyFromFile"
@@ -54,8 +54,9 @@ func NewBacktesterServiceClient(cc grpc.ClientConnInterface) BacktesterServiceCl
}
func (c *backtesterServiceClient) ExecuteStrategyFromFile(ctx context.Context, in *ExecuteStrategyFromFileRequest, opts ...grpc.CallOption) (*ExecuteStrategyResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ExecuteStrategyResponse)
err := c.cc.Invoke(ctx, BacktesterService_ExecuteStrategyFromFile_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, BacktesterService_ExecuteStrategyFromFile_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -63,8 +64,9 @@ func (c *backtesterServiceClient) ExecuteStrategyFromFile(ctx context.Context, i
}
func (c *backtesterServiceClient) ExecuteStrategyFromConfig(ctx context.Context, in *ExecuteStrategyFromConfigRequest, opts ...grpc.CallOption) (*ExecuteStrategyResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ExecuteStrategyResponse)
err := c.cc.Invoke(ctx, BacktesterService_ExecuteStrategyFromConfig_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, BacktesterService_ExecuteStrategyFromConfig_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -72,8 +74,9 @@ func (c *backtesterServiceClient) ExecuteStrategyFromConfig(ctx context.Context,
}
func (c *backtesterServiceClient) ListAllTasks(ctx context.Context, in *ListAllTasksRequest, opts ...grpc.CallOption) (*ListAllTasksResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListAllTasksResponse)
err := c.cc.Invoke(ctx, BacktesterService_ListAllTasks_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, BacktesterService_ListAllTasks_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -81,8 +84,9 @@ func (c *backtesterServiceClient) ListAllTasks(ctx context.Context, in *ListAllT
}
func (c *backtesterServiceClient) StartTask(ctx context.Context, in *StartTaskRequest, opts ...grpc.CallOption) (*StartTaskResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StartTaskResponse)
err := c.cc.Invoke(ctx, BacktesterService_StartTask_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, BacktesterService_StartTask_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -90,8 +94,9 @@ func (c *backtesterServiceClient) StartTask(ctx context.Context, in *StartTaskRe
}
func (c *backtesterServiceClient) StartAllTasks(ctx context.Context, in *StartAllTasksRequest, opts ...grpc.CallOption) (*StartAllTasksResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StartAllTasksResponse)
err := c.cc.Invoke(ctx, BacktesterService_StartAllTasks_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, BacktesterService_StartAllTasks_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -99,8 +104,9 @@ func (c *backtesterServiceClient) StartAllTasks(ctx context.Context, in *StartAl
}
func (c *backtesterServiceClient) StopTask(ctx context.Context, in *StopTaskRequest, opts ...grpc.CallOption) (*StopTaskResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StopTaskResponse)
err := c.cc.Invoke(ctx, BacktesterService_StopTask_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, BacktesterService_StopTask_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -108,8 +114,9 @@ func (c *backtesterServiceClient) StopTask(ctx context.Context, in *StopTaskRequ
}
func (c *backtesterServiceClient) StopAllTasks(ctx context.Context, in *StopAllTasksRequest, opts ...grpc.CallOption) (*StopAllTasksResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(StopAllTasksResponse)
err := c.cc.Invoke(ctx, BacktesterService_StopAllTasks_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, BacktesterService_StopAllTasks_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -117,8 +124,9 @@ func (c *backtesterServiceClient) StopAllTasks(ctx context.Context, in *StopAllT
}
func (c *backtesterServiceClient) ClearTask(ctx context.Context, in *ClearTaskRequest, opts ...grpc.CallOption) (*ClearTaskResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ClearTaskResponse)
err := c.cc.Invoke(ctx, BacktesterService_ClearTask_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, BacktesterService_ClearTask_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
@@ -126,8 +134,9 @@ func (c *backtesterServiceClient) ClearTask(ctx context.Context, in *ClearTaskRe
}
func (c *backtesterServiceClient) ClearAllTasks(ctx context.Context, in *ClearAllTasksRequest, opts ...grpc.CallOption) (*ClearAllTasksResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ClearAllTasksResponse)
err := c.cc.Invoke(ctx, BacktesterService_ClearAllTasks_FullMethodName, in, out, opts...)
err := c.cc.Invoke(ctx, BacktesterService_ClearAllTasks_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}