From 7ad80d7082a3d15d5b605ad9eef6da03731a0559 Mon Sep 17 00:00:00 2001 From: twystd Date: Fri, 23 Aug 2024 11:41:32 -0700 Subject: [PATCH] Updated to Go 1.23 --- .github/workflows/build.yml | 2 +- .github/workflows/ghcr.yml | 2 +- CHANGELOG.md | 1 + TODO.md | 13 +------------ go.mod | 6 +++--- go.sum | 4 ++++ simulator/UT0311L04/UTC0311L04.go | 2 +- 7 files changed, 12 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 398d955..5aaa267 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ jobs: - name: Set up Go 1.x uses: actions/setup-go@v5 with: - go-version: ^1.22 + go-version: ^1.23 cache: false - name: Checkout uhppote-core diff --git a/.github/workflows/ghcr.yml b/.github/workflows/ghcr.yml index b8e9c07..ebc71fc 100644 --- a/.github/workflows/ghcr.yml +++ b/.github/workflows/ghcr.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Go 1.x uses: actions/setup-go@v5 with: - go-version: ^1.22 + go-version: ^1.23 cache: false - name: Install staticcheck diff --git a/CHANGELOG.md b/CHANGELOG.md index f2ed4f2..049ada2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ ### Updated 1. Reworked event handling to use connected UDP socket to send events. +2. Updated to Go 1.23. ## [0.8.8](https://github.com/uhppoted/uhppote-simulator/releases/tag/v0.8.8) - 2024-03-27 diff --git a/TODO.md b/TODO.md index 80d5f82..a898243 100644 --- a/TODO.md +++ b/TODO.md @@ -1,19 +1,8 @@ # TODO - [x] https://github.com/uhppoted/uhppote-simulator/issues/9 - - [x] TCP/IP protocol (cf. https://github.com/uhppoted/uhppote-core/issues/17) - - [x] Rework UDP handling so that `if request.SerialNumber == s.SerialNumber` returns false - - [x] TCP accept socket - - [x] Rework UDP request handling - - [x] Rework UDP event handling - - [x] Update docker images, etc - - [x] CHANGELOG - - [x] README - -- [x] _405419896 error loading tasklist (unexpected end of JSON input)_ -- [x] Check `dump` udp/tcp packet labellingmay be mislabelling udp/tcp packets - +- [x] Update to Go 1.23 (cf. https://github.com/uhppoted/uhppoted/issues/53) ## TODO diff --git a/go.mod b/go.mod index 36b5deb..d901c57 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ module github.com/uhppoted/uhppote-simulator -go 1.22 +go 1.23 require ( - github.com/uhppoted/uhppote-core v0.8.9-0.20240624170631-6e4dc3a26486 - github.com/uhppoted/uhppoted-lib v0.8.9-0.20240624171129-71bfbf7969b5 + github.com/uhppoted/uhppote-core v0.8.9-0.20240823182843-e0981da9c4a4 + github.com/uhppoted/uhppoted-lib v0.8.9-0.20240823183521-d127a710cea0 ) diff --git a/go.sum b/go.sum index ad6f617..ed34b27 100644 --- a/go.sum +++ b/go.sum @@ -78,6 +78,8 @@ github.com/uhppoted/uhppote-core v0.8.9-0.20240621163845-0f2c4816e848 h1:BXgPJVS github.com/uhppoted/uhppote-core v0.8.9-0.20240621163845-0f2c4816e848/go.mod h1:Q+DHtT8s74efLs2b0eF20DRBUL9yBkySwaTQ+0lsEVM= github.com/uhppoted/uhppote-core v0.8.9-0.20240624170631-6e4dc3a26486 h1:mUSkpgClFvkWJ84L1S1066cjd2RRUjksmXO7HSHTZDY= github.com/uhppoted/uhppote-core v0.8.9-0.20240624170631-6e4dc3a26486/go.mod h1:Q+DHtT8s74efLs2b0eF20DRBUL9yBkySwaTQ+0lsEVM= +github.com/uhppoted/uhppote-core v0.8.9-0.20240823182843-e0981da9c4a4 h1:7zcs93hYt0sBp+kCIbgju4Tgc1zvaRVgReksSs4K1uM= +github.com/uhppoted/uhppote-core v0.8.9-0.20240823182843-e0981da9c4a4/go.mod h1:oUQdz4NBMXkcwzEHUd6lYQgF6He32+jnb+FMwehZRwg= github.com/uhppoted/uhppoted-lib v0.8.5 h1:X5RarX5QMRGJvOwPk8ceowrH8k6Ow3t+TraWmhYO950= github.com/uhppoted/uhppoted-lib v0.8.5/go.mod h1:euK2cLO934w0GDgvvnWMjYNtZ29K1xSMrMse6THOzDQ= github.com/uhppoted/uhppoted-lib v0.8.6-0.20230714155133-57e68f2d1360 h1:XaVqmMmjwskTrX6iCdUl2I4ezrvuoA/yhLzf/455E10= @@ -158,3 +160,5 @@ github.com/uhppoted/uhppoted-lib v0.8.9-0.20240621164457-8103bdf55831 h1:Y67K5dB github.com/uhppoted/uhppoted-lib v0.8.9-0.20240621164457-8103bdf55831/go.mod h1:Pj+5dhzmwQiLJK9aMQBMoaLU00Loeyv/UdGspDozReQ= github.com/uhppoted/uhppoted-lib v0.8.9-0.20240624171129-71bfbf7969b5 h1:Vo0V3T/VMFaZlqTDre3ht9DGxEceuUXmDlAZeKeEx+g= github.com/uhppoted/uhppoted-lib v0.8.9-0.20240624171129-71bfbf7969b5/go.mod h1:Rrms8n4z4xoLAcpmeMmXdXG9kakovAbw+7/zSmjzY2s= +github.com/uhppoted/uhppoted-lib v0.8.9-0.20240823183521-d127a710cea0 h1:ZD9n1Q6w2ykR2KoORUKo2s4lFLiWsCwMj5ByYec12bU= +github.com/uhppoted/uhppoted-lib v0.8.9-0.20240823183521-d127a710cea0/go.mod h1:vz01fBAy8QYbwUGBCfFEZh5naPt9Ma6SHlzp/SIRLcE= diff --git a/simulator/UT0311L04/UTC0311L04.go b/simulator/UT0311L04/UTC0311L04.go index f4a2283..21c57c5 100644 --- a/simulator/UT0311L04/UTC0311L04.go +++ b/simulator/UT0311L04/UTC0311L04.go @@ -348,7 +348,7 @@ func unmarshal(bytes []byte, filepath string, compressed bool) (*UT0311L04, erro Tasks: []types.Task{}, } - if object.TaskList != nil && len(object.TaskList) > 0 { + if len(object.TaskList) > 0 { if err := json.Unmarshal(object.TaskList, &tasklist); err != nil { warnf(object.SerialNumber, "error loading tasklist (%v)", err) }