Skip to content

Commit 14a9bf4

Browse files
authored
Merge pull request #46 from hlibman-connamara/update_version
Update to latest Quickfix version and fix linter complaints
2 parents 7c82397 + 36e7f43 commit 14a9bf4

File tree

9 files changed

+60
-54
lines changed

9 files changed

+60
-54
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ A clear description of what you expected to happen.
1919

2020
**system information:**
2121
- OS: [e.g. Linux]
22-
- Go version [e.g. Go 1.21.xx]
23-
- QF/Go Version [e.g. v0.8.1]
22+
- Go version [e.g. Go 1.23.xx]
23+
- QF/Go Version [e.g. v0.9.7]
2424

2525
**Additional context**
2626
Add any other context about the problem here.

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ jobs:
1818
name: Linter
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v3
22-
- uses: actions/setup-go@v4
21+
- uses: actions/checkout@v4
22+
- uses: actions/setup-go@v5
2323
with:
2424
go-version: '1.21'
2525
cache: false
2626
- name: golangci-lint
27-
uses: golangci/golangci-lint-action@v3
27+
uses: golangci/golangci-lint-action@v4
2828
with:
29-
version: v1.51
29+
version: v1.64.6
3030

3131
build:
3232
name: build

cmd/cmd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func Execute() error {
3333

3434
c := &cobra.Command{
3535
Use: "qf",
36-
RunE: func(cmd *cobra.Command, args []string) error {
36+
RunE: func(cmd *cobra.Command, _ []string) error {
3737
if versionF {
3838
version.PrintVersion()
3939
return nil

cmd/executor/executor.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ func (e *executor) genExecID() field.ExecIDField {
7979
}
8080

8181
// quickfix.Application interface
82-
func (e executor) OnCreate(sessionID quickfix.SessionID) {}
83-
func (e executor) OnLogon(sessionID quickfix.SessionID) {}
84-
func (e executor) OnLogout(sessionID quickfix.SessionID) {}
85-
func (e executor) ToAdmin(msg *quickfix.Message, sessionID quickfix.SessionID) {}
86-
func (e executor) ToApp(msg *quickfix.Message, sessionID quickfix.SessionID) error { return nil }
87-
func (e executor) FromAdmin(msg *quickfix.Message, sessionID quickfix.SessionID) quickfix.MessageRejectError {
82+
func (e executor) OnCreate(_ quickfix.SessionID) {}
83+
func (e executor) OnLogon(_ quickfix.SessionID) {}
84+
func (e executor) OnLogout(_ quickfix.SessionID) {}
85+
func (e executor) ToAdmin(_ *quickfix.Message, _ quickfix.SessionID) {}
86+
func (e executor) ToApp(_ *quickfix.Message, _ quickfix.SessionID) error { return nil }
87+
func (e executor) FromAdmin(_ *quickfix.Message, _ quickfix.SessionID) quickfix.MessageRejectError {
8888
return nil
8989
}
9090

@@ -505,7 +505,7 @@ var (
505505
}
506506
)
507507

508-
func execute(cmd *cobra.Command, args []string) error {
508+
func execute(_ *cobra.Command, args []string) error {
509509
var cfgFileName string
510510
argLen := len(args)
511511
switch argLen {

cmd/ordermatch/internal/order.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ type Order struct {
4040
}
4141

4242
func (o Order) IsClosed() bool {
43-
return o.OpenQuantity().Equals(decimal.Zero)
43+
return o.OpenQuantity().Equal(decimal.Zero)
4444
}
4545

4646
func (o Order) OpenQuantity() decimal.Decimal {

cmd/ordermatch/ordermatch.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,24 +59,24 @@ func newApplication() *Application {
5959
}
6060

6161
// OnCreate implemented as part of Application interface
62-
func (a Application) OnCreate(sessionID quickfix.SessionID) {}
62+
func (a Application) OnCreate(_ quickfix.SessionID) {}
6363

6464
// OnLogon implemented as part of Application interface
65-
func (a Application) OnLogon(sessionID quickfix.SessionID) {}
65+
func (a Application) OnLogon(_ quickfix.SessionID) {}
6666

6767
// OnLogout implemented as part of Application interface
68-
func (a Application) OnLogout(sessionID quickfix.SessionID) {}
68+
func (a Application) OnLogout(_ quickfix.SessionID) {}
6969

7070
// ToAdmin implemented as part of Application interface
71-
func (a Application) ToAdmin(msg *quickfix.Message, sessionID quickfix.SessionID) {}
71+
func (a Application) ToAdmin(_ *quickfix.Message, _ quickfix.SessionID) {}
7272

7373
// ToApp implemented as part of Application interface
74-
func (a Application) ToApp(msg *quickfix.Message, sessionID quickfix.SessionID) error {
74+
func (a Application) ToApp(_ *quickfix.Message, _ quickfix.SessionID) error {
7575
return nil
7676
}
7777

7878
// FromAdmin implemented as part of Application interface
79-
func (a Application) FromAdmin(msg *quickfix.Message, sessionID quickfix.SessionID) quickfix.MessageRejectError {
79+
func (a Application) FromAdmin(_ *quickfix.Message, _ quickfix.SessionID) quickfix.MessageRejectError {
8080
return nil
8181
}
8282

@@ -85,7 +85,7 @@ func (a *Application) FromApp(msg *quickfix.Message, sessionID quickfix.SessionI
8585
return a.Route(msg, sessionID)
8686
}
8787

88-
func (a *Application) onNewOrderSingle(msg newordersingle.NewOrderSingle, sessionID quickfix.SessionID) quickfix.MessageRejectError {
88+
func (a *Application) onNewOrderSingle(msg newordersingle.NewOrderSingle, _ quickfix.SessionID) quickfix.MessageRejectError {
8989
clOrdID, err := msg.GetClOrdID()
9090
if err != nil {
9191
return err
@@ -150,7 +150,7 @@ func (a *Application) onNewOrderSingle(msg newordersingle.NewOrderSingle, sessio
150150
return nil
151151
}
152152

153-
func (a *Application) onOrderCancelRequest(msg ordercancelrequest.OrderCancelRequest, sessionID quickfix.SessionID) quickfix.MessageRejectError {
153+
func (a *Application) onOrderCancelRequest(msg ordercancelrequest.OrderCancelRequest, _ quickfix.SessionID) quickfix.MessageRejectError {
154154
origClOrdID, err := msg.GetOrigClOrdID()
155155
if err != nil {
156156
return err
@@ -174,7 +174,7 @@ func (a *Application) onOrderCancelRequest(msg ordercancelrequest.OrderCancelReq
174174
return nil
175175
}
176176

177-
func (a *Application) onMarketDataRequest(msg marketdatarequest.MarketDataRequest, sessionID quickfix.SessionID) (err quickfix.MessageRejectError) {
177+
func (a *Application) onMarketDataRequest(msg marketdatarequest.MarketDataRequest, _ quickfix.SessionID) (err quickfix.MessageRejectError) {
178178
fmt.Printf("%+v\n", msg)
179179
return
180180
}
@@ -250,7 +250,7 @@ var (
250250
}
251251
)
252252

253-
func execute(cmd *cobra.Command, args []string) error {
253+
func execute(_ *cobra.Command, args []string) error {
254254
var cfgFileName string
255255
argLen := len(args)
256256
switch argLen {

cmd/tradeclient/tradeclient.go

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,37 +27,38 @@ import (
2727
"github.com/spf13/cobra"
2828

2929
"github.com/quickfixgo/quickfix"
30+
"github.com/quickfixgo/quickfix/log/file"
3031
)
3132

3233
// TradeClient implements the quickfix.Application interface
3334
type TradeClient struct {
3435
}
3536

3637
// OnCreate implemented as part of Application interface
37-
func (e TradeClient) OnCreate(sessionID quickfix.SessionID) {}
38+
func (e TradeClient) OnCreate(_ quickfix.SessionID) {}
3839

3940
// OnLogon implemented as part of Application interface
40-
func (e TradeClient) OnLogon(sessionID quickfix.SessionID) {}
41+
func (e TradeClient) OnLogon(_ quickfix.SessionID) {}
4142

4243
// OnLogout implemented as part of Application interface
43-
func (e TradeClient) OnLogout(sessionID quickfix.SessionID) {}
44+
func (e TradeClient) OnLogout(_ quickfix.SessionID) {}
4445

4546
// FromAdmin implemented as part of Application interface
46-
func (e TradeClient) FromAdmin(msg *quickfix.Message, sessionID quickfix.SessionID) (reject quickfix.MessageRejectError) {
47+
func (e TradeClient) FromAdmin(_ *quickfix.Message, _ quickfix.SessionID) (reject quickfix.MessageRejectError) {
4748
return nil
4849
}
4950

5051
// ToAdmin implemented as part of Application interface
51-
func (e TradeClient) ToAdmin(msg *quickfix.Message, sessionID quickfix.SessionID) {}
52+
func (e TradeClient) ToAdmin(_ *quickfix.Message, _ quickfix.SessionID) {}
5253

5354
// ToApp implemented as part of Application interface
54-
func (e TradeClient) ToApp(msg *quickfix.Message, sessionID quickfix.SessionID) (err error) {
55+
func (e TradeClient) ToApp(msg *quickfix.Message, _ quickfix.SessionID) (err error) {
5556
utils.PrintInfo(fmt.Sprintf("Sending: %s", msg.String()))
5657
return
5758
}
5859

5960
// FromApp implemented as part of Application interface. This is the callback for all Application level messages from the counter party.
60-
func (e TradeClient) FromApp(msg *quickfix.Message, sessionID quickfix.SessionID) (reject quickfix.MessageRejectError) {
61+
func (e TradeClient) FromApp(msg *quickfix.Message, _ quickfix.SessionID) (reject quickfix.MessageRejectError) {
6162
utils.PrintInfo(fmt.Sprintf("FromApp: %s", msg.String()))
6263
return
6364
}
@@ -80,7 +81,7 @@ var (
8081
}
8182
)
8283

83-
func execute(cmd *cobra.Command, args []string) error {
84+
func execute(_ *cobra.Command, args []string) error {
8485
var cfgFileName string
8586
argLen := len(args)
8687
switch argLen {
@@ -117,7 +118,7 @@ func execute(cmd *cobra.Command, args []string) error {
117118
}
118119

119120
app := TradeClient{}
120-
fileLogFactory, err := quickfix.NewFileLogFactory(appSettings)
121+
fileLogFactory, err := file.NewLogFactory(appSettings)
121122

122123
if err != nil {
123124
return fmt.Errorf("error creating file log factory: %s,", err)

go.mod

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
module github.com/quickfixgo/examples
22

3-
go 1.21
3+
go 1.23
4+
5+
toolchain go1.23.9
46

57
require (
68
github.com/fatih/color v1.16.0
@@ -13,22 +15,23 @@ require (
1315
github.com/quickfixgo/fix43 v0.1.0
1416
github.com/quickfixgo/fix44 v0.1.0
1517
github.com/quickfixgo/fix50 v0.1.0
16-
github.com/quickfixgo/quickfix v0.9.0
18+
github.com/quickfixgo/quickfix v0.9.7
1719
github.com/quickfixgo/tag v0.1.0
18-
github.com/shopspring/decimal v1.3.1
20+
github.com/shopspring/decimal v1.4.0
1921
github.com/spf13/cobra v1.8.0
2022
)
2123

2224
require (
23-
github.com/armon/go-proxyproto v0.1.0 // indirect
2425
github.com/inconshreveable/mousetrap v1.1.0 // indirect
2526
github.com/mattn/go-colorable v0.1.13 // indirect
2627
github.com/mattn/go-isatty v0.0.20 // indirect
2728
github.com/mattn/go-runewidth v0.0.15 // indirect
29+
github.com/pires/go-proxyproto v0.7.0 // indirect
2830
github.com/pkg/errors v0.9.1 // indirect
31+
github.com/quagmt/udecimal v1.8.0 // indirect
2932
github.com/quickfixgo/fixt11 v0.1.0 // indirect
3033
github.com/rivo/uniseg v0.4.4 // indirect
3134
github.com/spf13/pflag v1.0.5 // indirect
32-
golang.org/x/net v0.18.0 // indirect
33-
golang.org/x/sys v0.14.0 // indirect
35+
golang.org/x/net v0.24.0 // indirect
36+
golang.org/x/sys v0.19.0 // indirect
3437
)

go.sum

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
github.com/armon/go-proxyproto v0.1.0 h1:TWWcSsjco7o2itn6r25/5AqKBiWmsiuzsUDLT/MTl7k=
2-
github.com/armon/go-proxyproto v0.1.0/go.mod h1:Xj90dce2VKbHzRAeiVQAMBtj4M5oidoXJ8lmgyW21mw=
31
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
42
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
53
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -16,10 +14,14 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE
1614
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
1715
github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=
1816
github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
17+
github.com/pires/go-proxyproto v0.7.0 h1:IukmRewDQFWC7kfnb66CSomk2q/seBuilHBYFwyq0Hs=
18+
github.com/pires/go-proxyproto v0.7.0/go.mod h1:Vz/1JPY/OACxWGQNIRY2BeyDmpoaWmEP40O9LbuiFR4=
1919
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
2020
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
2121
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
2222
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
23+
github.com/quagmt/udecimal v1.8.0 h1:d4MJNGb/dg8r03AprkeSiDlVKtkZnL10L3de/YGOiiI=
24+
github.com/quagmt/udecimal v1.8.0/go.mod h1:ScmJ/xTGZcEoYiyMMzgDLn79PEJHcMBiJ4NNRT3FirA=
2325
github.com/quickfixgo/enum v0.1.0 h1:TnCPOqxAWA5/IWp7lsvj97x7oyuHYgj3STBJlBzZGjM=
2426
github.com/quickfixgo/enum v0.1.0/go.mod h1:65gdG2/8vr6uOYcjZBObVHMuTEYc5rr/+aKVWTrFIrQ=
2527
github.com/quickfixgo/field v0.1.0 h1:JVO6fVD6Nkyy8e/ROYQtV/nQhMX/BStD5Lq7XIgYz2g=
@@ -38,30 +40,30 @@ github.com/quickfixgo/fix50 v0.1.0 h1:fD+93ap9P2lWbI42MFOdcUnzf+GRQHkyqWYYCKeTko
3840
github.com/quickfixgo/fix50 v0.1.0/go.mod h1:ZxQTqXY1IJnpN0v2CgYTFn3/ffbKsX/fWI31O3pBk9M=
3941
github.com/quickfixgo/fixt11 v0.1.0 h1:7pPnTNPa5wESbQVezLK6ExbSaqcJS2oruMUgnNNH8ZM=
4042
github.com/quickfixgo/fixt11 v0.1.0/go.mod h1:JV9yBYvw7dx6hQZeI3rV7eJ6c3SUf5bXwSU3Eb09ok0=
41-
github.com/quickfixgo/quickfix v0.9.0 h1:WshR3GUSxR69ZrSQfppKs2zZ12dTYtU3JUgQg+PAOdA=
42-
github.com/quickfixgo/quickfix v0.9.0/go.mod h1:t5Z881dOZ2Dz5vM6KIbMCx3YpAiFPFf/iCLCSn91Qqo=
43+
github.com/quickfixgo/quickfix v0.9.7 h1:vvx/cydUG6cnGDyYeUxKA5MTzbYFQulthdTHzmmsvmc=
44+
github.com/quickfixgo/quickfix v0.9.7/go.mod h1:LpvubslWDsNapeQDvhYS2Qty9gJtm2vr/gSdUcpdEwU=
4345
github.com/quickfixgo/tag v0.1.0 h1:R2A1Zf7CBE903+mOQlmTlfTmNZQz/yh7HunMbgcsqsA=
4446
github.com/quickfixgo/tag v0.1.0/go.mod h1:l/drB1eO3PwN9JQTDC9Vt2EqOcaXk3kGJ+eeCQljvAI=
4547
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
4648
github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis=
4749
github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
4850
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
49-
github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8=
50-
github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
51+
github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k=
52+
github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME=
5153
github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
5254
github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho=
5355
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
5456
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
55-
github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
56-
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
57-
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
58-
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
59-
golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg=
60-
golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ=
57+
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
58+
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
59+
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
60+
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
61+
golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
62+
golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
6163
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
6264
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
63-
golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=
64-
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
65+
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
66+
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
6567
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
6668
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
6769
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

0 commit comments

Comments
 (0)