From 46d7ce9881864f9e1a25e30fe92f6a952f82cfa9 Mon Sep 17 00:00:00 2001 From: Landon Baxter Date: Tue, 26 May 2026 12:00:32 -0600 Subject: [PATCH 1/2] Upgrade to gots/v3, Go 1.26 --- Readme.md | 2 +- cli/parsefile.go | 10 +++++----- ebp/cablelabsebp.go | 2 +- ebp/comcastebp.go | 2 +- ebp/ebp.go | 2 +- ebp/ebp_test.go | 2 +- go.mod | 4 ++-- packet/accumulator.go | 2 +- packet/accumulator_test.go | 2 +- packet/adaptationfield.go | 2 +- packet/adaptationfield/adaptationfield.go | 4 ++-- packet/create.go | 2 +- packet/io.go | 2 +- packet/modify.go | 2 +- packet/packet.go | 2 +- packet/packetwriter.go | 2 +- pes/pes.go | 2 +- pes/pesheader.go | 2 +- pes/pesheader_test.go | 2 +- psi/pat.go | 4 ++-- psi/pmt.go | 4 ++-- psi/pmt_test.go | 4 ++-- psi/psi.go | 2 +- scte35/descriptormodify.go | 2 +- scte35/doc.go | 4 ++-- scte35/modify.go | 4 ++-- scte35/modify_test.go | 4 ++-- scte35/scte35.go | 4 ++-- scte35/scte35_test.go | 2 +- scte35/segmentationdescriptor.go | 2 +- scte35/splicecommand.go | 2 +- scte35/splicecommandmodify.go | 2 +- scte35/state.go | 2 +- scte35/state_test.go | 2 +- 34 files changed, 47 insertions(+), 47 deletions(-) diff --git a/Readme.md b/Readme.md index 6166b6f..dee99b3 100644 --- a/Readme.md +++ b/Readme.md @@ -1,4 +1,4 @@ -[![Go Reference](https://pkg.go.dev/badge/github.com/Comcast/gots/v2.svg)](https://pkg.go.dev/github.com/Comcast/gots/v2) +[![Go Reference](https://pkg.go.dev/badge/github.com/Comcast/gots/v3.svg)](https://pkg.go.dev/github.com/Comcast/gots/v3) [![Build Status](https://travis-ci.org/Comcast/gots.svg?branch=master)](https://travis-ci.org/Comcast/gots) [![Go Report Card](https://goreportcard.com/badge/github.com/Comcast/gots)](https://goreportcard.com/report/github.com/Comcast/gots) [![Coverage Status](https://coveralls.io/repos/github/Comcast/gots/badge.svg?branch=master)](https://coveralls.io/github/Comcast/gots?branch=master) diff --git a/cli/parsefile.go b/cli/parsefile.go index 4b6588d..322ab0c 100644 --- a/cli/parsefile.go +++ b/cli/parsefile.go @@ -32,11 +32,11 @@ import ( "io" "os" - "github.com/Comcast/gots/v2/ebp" - "github.com/Comcast/gots/v2/packet" - "github.com/Comcast/gots/v2/packet/adaptationfield" - "github.com/Comcast/gots/v2/psi" - "github.com/Comcast/gots/v2/scte35" + "github.com/Comcast/gots/v3/ebp" + "github.com/Comcast/gots/v3/packet" + "github.com/Comcast/gots/v3/packet/adaptationfield" + "github.com/Comcast/gots/v3/psi" + "github.com/Comcast/gots/v3/scte35" ) // main parses a ts file that is provided with the -f flag diff --git a/ebp/cablelabsebp.go b/ebp/cablelabsebp.go index b3ca48c..b80ed29 100644 --- a/ebp/cablelabsebp.go +++ b/ebp/cablelabsebp.go @@ -29,7 +29,7 @@ import ( "encoding/binary" "time" - "github.com/Comcast/gots/v2" + "github.com/Comcast/gots/v3" ) // cableLabsEbp is an encoder boundary point diff --git a/ebp/comcastebp.go b/ebp/comcastebp.go index f063375..791acc7 100644 --- a/ebp/comcastebp.go +++ b/ebp/comcastebp.go @@ -29,7 +29,7 @@ import ( "encoding/binary" "time" - "github.com/Comcast/gots/v2" + "github.com/Comcast/gots/v3" ) // cableLabsEbp is an encoder boundary point diff --git a/ebp/ebp.go b/ebp/ebp.go index 22dd27e..f06623b 100644 --- a/ebp/ebp.go +++ b/ebp/ebp.go @@ -28,7 +28,7 @@ import ( "encoding/binary" "time" - "github.com/Comcast/gots/v2" + "github.com/Comcast/gots/v3" ) // EBP tags diff --git a/ebp/ebp_test.go b/ebp/ebp_test.go index bb44a1a..b5336ea 100644 --- a/ebp/ebp_test.go +++ b/ebp/ebp_test.go @@ -27,7 +27,7 @@ import ( "testing" "time" - "github.com/Comcast/gots/v2" + "github.com/Comcast/gots/v3" ) var CableLabsEBPBytes = []byte{ diff --git a/go.mod b/go.mod index 1b733fe..8dae266 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module github.com/Comcast/gots/v2 +module github.com/Comcast/gots/v3 -go 1.18 +go 1.26 diff --git a/packet/accumulator.go b/packet/accumulator.go index 27a324e..d13f0c2 100644 --- a/packet/accumulator.go +++ b/packet/accumulator.go @@ -27,7 +27,7 @@ package packet import ( "bytes" - "github.com/Comcast/gots/v2" + "github.com/Comcast/gots/v3" ) // Iotas to track the state of the accumulator diff --git a/packet/accumulator_test.go b/packet/accumulator_test.go index 6b9c816..64741eb 100644 --- a/packet/accumulator_test.go +++ b/packet/accumulator_test.go @@ -28,7 +28,7 @@ import ( "encoding/hex" "testing" - "github.com/Comcast/gots/v2" + "github.com/Comcast/gots/v3" ) // PacketAccumulator is not thread safe diff --git a/packet/adaptationfield.go b/packet/adaptationfield.go index 18f8c07..da274e3 100644 --- a/packet/adaptationfield.go +++ b/packet/adaptationfield.go @@ -25,7 +25,7 @@ SOFTWARE. package packet import ( - "github.com/Comcast/gots/v2" + "github.com/Comcast/gots/v3" ) const ( diff --git a/packet/adaptationfield/adaptationfield.go b/packet/adaptationfield/adaptationfield.go index bb4b31d..11f9502 100644 --- a/packet/adaptationfield/adaptationfield.go +++ b/packet/adaptationfield/adaptationfield.go @@ -1,8 +1,8 @@ package adaptationfield import ( - "github.com/Comcast/gots/v2" - "github.com/Comcast/gots/v2/packet" + "github.com/Comcast/gots/v3" + "github.com/Comcast/gots/v3/packet" ) // Length returns the length of the adaptation field in bytes diff --git a/packet/create.go b/packet/create.go index 6ce6478..f76de8b 100644 --- a/packet/create.go +++ b/packet/create.go @@ -25,7 +25,7 @@ SOFTWARE. package packet import ( - "github.com/Comcast/gots/v2" + "github.com/Comcast/gots/v3" ) var ( diff --git a/packet/io.go b/packet/io.go index f1b964e..b5a12e9 100644 --- a/packet/io.go +++ b/packet/io.go @@ -28,7 +28,7 @@ import ( "encoding/binary" "io" - "github.com/Comcast/gots/v2" + "github.com/Comcast/gots/v3" ) // Peeker wraps the Peek method. diff --git a/packet/modify.go b/packet/modify.go index 49ebb35..b1af4d8 100644 --- a/packet/modify.go +++ b/packet/modify.go @@ -25,7 +25,7 @@ SOFTWARE. package packet import ( - "github.com/Comcast/gots/v2" + "github.com/Comcast/gots/v3" ) // flags that are reserved and should not be used. diff --git a/packet/packet.go b/packet/packet.go index 9cc012f..0a683cc 100644 --- a/packet/packet.go +++ b/packet/packet.go @@ -25,7 +25,7 @@ SOFTWARE. package packet import ( - "github.com/Comcast/gots/v2" + "github.com/Comcast/gots/v3" ) const ( diff --git a/packet/packetwriter.go b/packet/packetwriter.go index bc6e100..359f758 100644 --- a/packet/packetwriter.go +++ b/packet/packetwriter.go @@ -27,7 +27,7 @@ package packet import ( "io" - "github.com/Comcast/gots/v2" + "github.com/Comcast/gots/v3" ) // PacketWriter is subject to all rules governing implementations of io.Writer diff --git a/pes/pes.go b/pes/pes.go index 1215d3b..1c6566a 100644 --- a/pes/pes.go +++ b/pes/pes.go @@ -24,7 +24,7 @@ SOFTWARE. package pes -import "github.com/Comcast/gots/v2/packet" +import "github.com/Comcast/gots/v3/packet" // AlignedPUSI checks for a PUSI with aligned flag set and returns a bool // indicating a match when true, as well as the bytes for the PES data diff --git a/pes/pesheader.go b/pes/pesheader.go index c7f561c..f3eb78b 100644 --- a/pes/pesheader.go +++ b/pes/pesheader.go @@ -28,7 +28,7 @@ import ( "errors" "fmt" - "github.com/Comcast/gots/v2" + "github.com/Comcast/gots/v3" ) // stream_id possibilities diff --git a/pes/pesheader_test.go b/pes/pesheader_test.go index 105f301..352b37f 100644 --- a/pes/pesheader_test.go +++ b/pes/pesheader_test.go @@ -27,7 +27,7 @@ import ( "encoding/hex" "testing" - "github.com/Comcast/gots/v2/packet" + "github.com/Comcast/gots/v3/packet" ) func parseHexString(h string) *packet.Packet { diff --git a/psi/pat.go b/psi/pat.go index 2a3e14b..83e99cb 100644 --- a/psi/pat.go +++ b/psi/pat.go @@ -28,8 +28,8 @@ import ( "errors" "io" - "github.com/Comcast/gots/v2" - "github.com/Comcast/gots/v2/packet" + "github.com/Comcast/gots/v3" + "github.com/Comcast/gots/v3/packet" ) const ( diff --git a/psi/pmt.go b/psi/pmt.go index 7f3847c..c68fb28 100644 --- a/psi/pmt.go +++ b/psi/pmt.go @@ -30,8 +30,8 @@ import ( "fmt" "io" - "github.com/Comcast/gots/v2" - "github.com/Comcast/gots/v2/packet" + "github.com/Comcast/gots/v3" + "github.com/Comcast/gots/v3/packet" ) const PidNotFound int = 1<<16 - 1 diff --git a/psi/pmt_test.go b/psi/pmt_test.go index 4f5061f..5080ccc 100644 --- a/psi/pmt_test.go +++ b/psi/pmt_test.go @@ -30,8 +30,8 @@ import ( "fmt" "testing" - "github.com/Comcast/gots/v2" - "github.com/Comcast/gots/v2/packet" + "github.com/Comcast/gots/v3" + "github.com/Comcast/gots/v3/packet" ) func parseHexString(h string) *packet.Packet { diff --git a/psi/psi.go b/psi/psi.go index 1fb23fb..7ddecaf 100644 --- a/psi/psi.go +++ b/psi/psi.go @@ -25,7 +25,7 @@ SOFTWARE. package psi import ( - "github.com/Comcast/gots/v2" + "github.com/Comcast/gots/v3" ) // TableHeader struct represents operations available on all PSI diff --git a/scte35/descriptormodify.go b/scte35/descriptormodify.go index 7dc0233..7937006 100644 --- a/scte35/descriptormodify.go +++ b/scte35/descriptormodify.go @@ -25,7 +25,7 @@ SOFTWARE. package scte35 import ( - "github.com/Comcast/gots/v2" + "github.com/Comcast/gots/v3" ) // SetUPIDType will set the type of the UPID diff --git a/scte35/doc.go b/scte35/doc.go index 8b325e6..d144649 100644 --- a/scte35/doc.go +++ b/scte35/doc.go @@ -26,8 +26,8 @@ SOFTWARE. package scte35 import ( - "github.com/Comcast/gots/v2" - "github.com/Comcast/gots/v2/psi" + "github.com/Comcast/gots/v3" + "github.com/Comcast/gots/v3/psi" ) // SpliceCommandType is a type used to describe the types of splice commands. diff --git a/scte35/modify.go b/scte35/modify.go index 46927d7..71b65a1 100644 --- a/scte35/modify.go +++ b/scte35/modify.go @@ -25,8 +25,8 @@ SOFTWARE. package scte35 import ( - "github.com/Comcast/gots/v2" - "github.com/Comcast/gots/v2/psi" + "github.com/Comcast/gots/v3" + "github.com/Comcast/gots/v3/psi" ) // CreateSCTE35 creates a default SCTE35 message and returns it. diff --git a/scte35/modify_test.go b/scte35/modify_test.go index a0cff4a..2c164a4 100644 --- a/scte35/modify_test.go +++ b/scte35/modify_test.go @@ -26,8 +26,8 @@ package scte35 import ( "bytes" - "github.com/Comcast/gots/v2" - "github.com/Comcast/gots/v2/psi" + "github.com/Comcast/gots/v3" + "github.com/Comcast/gots/v3/psi" "testing" ) diff --git a/scte35/scte35.go b/scte35/scte35.go index 4c42e0a..7b9ba16 100644 --- a/scte35/scte35.go +++ b/scte35/scte35.go @@ -29,8 +29,8 @@ import ( "encoding/binary" "fmt" - "github.com/Comcast/gots/v2" - "github.com/Comcast/gots/v2/psi" + "github.com/Comcast/gots/v3" + "github.com/Comcast/gots/v3/psi" ) // Descriptor tag types and identifiers - only segmentation descriptors are used for now diff --git a/scte35/scte35_test.go b/scte35/scte35_test.go index 6b51abf..745b4d9 100644 --- a/scte35/scte35_test.go +++ b/scte35/scte35_test.go @@ -30,7 +30,7 @@ import ( "strings" "testing" - "github.com/Comcast/gots/v2" + "github.com/Comcast/gots/v3" ) var testScte = []byte{ diff --git a/scte35/segmentationdescriptor.go b/scte35/segmentationdescriptor.go index 9dacc57..fd34cc2 100644 --- a/scte35/segmentationdescriptor.go +++ b/scte35/segmentationdescriptor.go @@ -29,7 +29,7 @@ import ( "encoding/binary" "strings" - "github.com/Comcast/gots/v2" + "github.com/Comcast/gots/v3" ) // upidSt is the struct used for creating a Multiple UPID (MID) diff --git a/scte35/splicecommand.go b/scte35/splicecommand.go index 0f8b809..364cec8 100644 --- a/scte35/splicecommand.go +++ b/scte35/splicecommand.go @@ -28,7 +28,7 @@ import ( "bytes" "encoding/binary" - "github.com/Comcast/gots/v2" + "github.com/Comcast/gots/v3" ) // timeSignal is a struct that represents a time signal splice command in SCTE35 diff --git a/scte35/splicecommandmodify.go b/scte35/splicecommandmodify.go index 8f7ea0b..34782d6 100644 --- a/scte35/splicecommandmodify.go +++ b/scte35/splicecommandmodify.go @@ -25,7 +25,7 @@ SOFTWARE. package scte35 import ( - "github.com/Comcast/gots/v2" + "github.com/Comcast/gots/v3" ) // CreateSpliceInsertCommand will create a default SpliceInsertCommand. diff --git a/scte35/state.go b/scte35/state.go index 00f60cf..7968e29 100644 --- a/scte35/state.go +++ b/scte35/state.go @@ -27,7 +27,7 @@ package scte35 import ( "strings" - "github.com/Comcast/gots/v2" + "github.com/Comcast/gots/v3" ) const receivedRingLen = 10 diff --git a/scte35/state_test.go b/scte35/state_test.go index 04e91c3..79d9f94 100644 --- a/scte35/state_test.go +++ b/scte35/state_test.go @@ -28,7 +28,7 @@ import ( "fmt" "testing" - "github.com/Comcast/gots/v2" + "github.com/Comcast/gots/v3" ) // All signal data generated with scte_creator: https://github.comcast.com/mniebu200/scte_creator From adcc73b7d364e3e5da5f5310ac81db04195856c1 Mon Sep 17 00:00:00 2001 From: Landon Baxter Date: Tue, 26 May 2026 12:16:36 -0600 Subject: [PATCH 2/2] Update `go-version` for unit test job --- .github/workflows/pull-request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index a5ed9c0..477b366 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -6,7 +6,7 @@ jobs: test: strategy: matrix: - go-version: [1.14.x, 1.15.x, 1.16.x, 1.17.x, 1.18.x, 1.19.x] + go-version: [1.24.x, 1.25.x, 1.26.x] os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: