Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#115 Update dependencies #210

Merged
merged 3 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,21 @@ jobs:

- name: Copy Senzing headers
run: |
mkdir --parents ./szconfig/gohelpers
mkdir --parents ./szconfig/szhelpers
cp /opt/senzing/er/sdk/c/*.h ./szconfig/
cp /opt/senzing/er/sdk/c/gohelpers/*.h ./szconfig/gohelpers
mkdir --parents ./szconfigmanager/gohelpers
cp /opt/senzing/er/sdk/c/szhelpers/*.h ./szconfig/szhelpers
mkdir --parents ./szconfigmanager/szhelpers
cp /opt/senzing/er/sdk/c/*.h ./szconfigmanager/
cp /opt/senzing/er/sdk/c/gohelpers/*.h ./szconfigmanager/gohelpers
mkdir --parents ./szdiagnostic/gohelpers
cp /opt/senzing/er/sdk/c/szhelpers/*.h ./szconfigmanager/szhelpers
mkdir --parents ./szdiagnostic/szhelpers
cp /opt/senzing/er/sdk/c/*.h ./szdiagnostic/
cp /opt/senzing/er/sdk/c/gohelpers/*.h ./szdiagnostic/gohelpers
mkdir --parents ./szengine/gohelpers
cp /opt/senzing/er/sdk/c/szhelpers/*.h ./szdiagnostic/szhelpers
mkdir --parents ./szengine/szhelpers
cp /opt/senzing/er/sdk/c/*.h ./szengine/
cp /opt/senzing/er/sdk/c/gohelpers/*.h ./szengine/gohelpers
mkdir --parents ./szproduct/gohelpers
cp /opt/senzing/er/sdk/c/szhelpers/*.h ./szengine/szhelpers
mkdir --parents ./szproduct/szhelpers
cp /opt/senzing/er/sdk/c/*.h ./szproduct/
cp /opt/senzing/er/sdk/c/gohelpers/*.h ./szproduct/gohelpers
cp /opt/senzing/er/sdk/c/szhelpers/*.h ./szproduct/szhelpers

- name: Setup go
uses: actions/setup-go@v5
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ and this project adheres to [Semantic Versioning].

-

## [0.9.3] - 2024-10-30

### Changed in 0.9.3

- Migrate to using `SzAbastractFactory.Destroy()`
- Update dependencies

## [0.9.2] - 2024-09-12

### Changed in 0.9.2
Expand Down
22 changes: 11 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ toolchain go1.23.1
require (
github.com/senzing-garage/go-helpers v0.6.1
github.com/senzing-garage/go-logging v1.5.1
github.com/senzing-garage/sz-sdk-go v0.14.2
github.com/senzing-garage/sz-sdk-go-core v0.8.3
github.com/senzing-garage/sz-sdk-go-grpc v0.8.3
github.com/senzing-garage/sz-sdk-go-mock v0.8.2
github.com/senzing-garage/sz-sdk-go v0.14.3
github.com/senzing-garage/sz-sdk-go-core v0.8.4
github.com/senzing-garage/sz-sdk-go-grpc v0.8.4
github.com/senzing-garage/sz-sdk-go-mock v0.8.3
github.com/stretchr/testify v1.9.0
google.golang.org/grpc v1.67.1
)
Expand All @@ -20,12 +20,12 @@ require (
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/senzing-garage/go-messaging v1.5.2 // indirect
github.com/senzing-garage/go-observing v0.3.3 // indirect
github.com/senzing-garage/sz-sdk-proto v0.7.8 // indirect
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/text v0.18.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f // indirect
google.golang.org/protobuf v1.34.2 // indirect
github.com/senzing-garage/sz-sdk-proto v0.7.10 // indirect
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/text v0.19.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 // indirect
google.golang.org/protobuf v1.35.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
44 changes: 22 additions & 22 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,32 @@ github.com/senzing-garage/go-messaging v1.5.2 h1:lU9W2HV3zKQsDU9Vs7lwe/C/LbHVCMn
github.com/senzing-garage/go-messaging v1.5.2/go.mod h1:iEWGVuDGWjolIkwLqnn9oJS7ifF3aoZjTtI44tf1gWQ=
github.com/senzing-garage/go-observing v0.3.3 h1:AhQYgOG012sDZtWXYcXVAaS5qEoDjlWmPYJDVCUZ/g0=
github.com/senzing-garage/go-observing v0.3.3/go.mod h1:qFUi5Dwb6vmd7izTZGjGbWKUGRHzWzsgbsX3oNSD198=
github.com/senzing-garage/sz-sdk-go v0.14.2 h1:1LksQW0+epSY0DhlxThxrnfeDwgyLPvyqG9NehZmz04=
github.com/senzing-garage/sz-sdk-go v0.14.2/go.mod h1:rj9HH6qo+kW5PsFSRnEIUQqDZBE34gZjQGsDvAxw6dI=
github.com/senzing-garage/sz-sdk-go-core v0.8.3 h1:FlBRkqQd9QKPmr9KVVtG+FsoczqO+fXhRoZ9DnnvP0Y=
github.com/senzing-garage/sz-sdk-go-core v0.8.3/go.mod h1:uwAgQ/Ai8gKhJL/5TYMWYoDte7wnDqJXPWRD5A/Ushg=
github.com/senzing-garage/sz-sdk-go-grpc v0.8.3 h1:9UNfFOHkMYMl7xv3itTAdLy+XqUfSNMol293/L1fmcs=
github.com/senzing-garage/sz-sdk-go-grpc v0.8.3/go.mod h1:cBX6LXYLNyrNNRhPQ+XTWtpELydFKki+MvQWi/RqrLY=
github.com/senzing-garage/sz-sdk-go-mock v0.8.2 h1:59mspw8IozgZNMYIJ4840G7JLoBcVw4EaKJkCPSsZN8=
github.com/senzing-garage/sz-sdk-go-mock v0.8.2/go.mod h1:azVWET6la8ozTv0h5ZEd84MHNK5E1I2prffDszGIv4I=
github.com/senzing-garage/sz-sdk-proto v0.7.8 h1:kh1Xas66cPj41rOwdfGZ54agyiQJCxh82QXH+mT+qEk=
github.com/senzing-garage/sz-sdk-proto v0.7.8/go.mod h1:zvm6iJkUSGyXCVSjDE3KzL815uRcoEXocgGsPc0lWAQ=
github.com/senzing-garage/sz-sdk-go v0.14.3 h1:vcTJDn84bTGuFt2kWw8jDf4FfgUSePB+UJg3C2cPIBk=
github.com/senzing-garage/sz-sdk-go v0.14.3/go.mod h1:rj9HH6qo+kW5PsFSRnEIUQqDZBE34gZjQGsDvAxw6dI=
github.com/senzing-garage/sz-sdk-go-core v0.8.4 h1:Iy9KqdkP9Wf2w9jUa3jsiQEJF7CAazpoGsNXAUK9+68=
github.com/senzing-garage/sz-sdk-go-core v0.8.4/go.mod h1:p+ntbY2lgZBVpSNPGUxhifcFa12VOY/54TdhJWKbkKM=
github.com/senzing-garage/sz-sdk-go-grpc v0.8.4 h1:vRU5rn/QSMoUbXvLOdYJP41xsYrx22P15U+yUdbgjxg=
github.com/senzing-garage/sz-sdk-go-grpc v0.8.4/go.mod h1:CdjUjZJIPHJQsBkaPamMeRZO2CKGxTDUFUsWUp2aeS0=
github.com/senzing-garage/sz-sdk-go-mock v0.8.3 h1:QrqBqfksWY8LdGgpbMz/5ReRKpyvEHmW+qD7qp6dlns=
github.com/senzing-garage/sz-sdk-go-mock v0.8.3/go.mod h1:SoHQBFq9KkNywhh4IaJsOKWmxySrAxOFq1nFROPtpXI=
github.com/senzing-garage/sz-sdk-proto v0.7.10 h1:T5T4W63awD9znLrDk94vVzgy1+GBb1ouEkCbtCqJans=
github.com/senzing-garage/sz-sdk-proto v0.7.10/go.mod h1:pvaLa5AR36n5T59Perh/zulKKPe6EB1HTWGhSP4smb4=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk=
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY=
golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo=
golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0=
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f h1:cUMEy+8oS78BWIH9OWazBkzbr090Od9tWBNtZHkOhf0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c h1:7dEasQXItcW1xKJ2+gg5VOiBnqWrJc+rq0DPKyvvdbY=
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c/go.mod h1:NQtJDoLvd6faHhE7m4T/1IY708gDefGGjR/iUW8yQQ8=
golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4=
golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU=
golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo=
golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM=
golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 h1:zciRKQ4kBpFgpfC5QQCVtnnNAcLIqweL7plyZRQHVpI=
google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI=
google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E=
google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA=
google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
Expand Down
28 changes: 12 additions & 16 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,40 +87,36 @@ func main() {
default:
failOnError(5003, fmt.Errorf("unknown testcase number"))
}
defer func() { deferredError(szAbstractFactory.Destroy(ctx)) }()

// Get Senzing objects for installing a Senzing Engine configuration.

szConfig, err := szAbstractFactory.CreateSzConfig(ctx)
failOnError(5004, err)
defer func() { deferredError(szConfig.Destroy(ctx)) }()

szConfigManager, err := szAbstractFactory.CreateSzConfigManager(ctx)
failOnError(5005, err)

szDiagnostic, err := szAbstractFactory.CreateSzDiagnostic(ctx)
failOnError(5006, err)

szEngine, err := szAbstractFactory.CreateSzEngine(ctx)
failOnError(5007, err)
defer func() { deferredError(szConfigManager.Destroy(ctx)) }()

szProduct, err := szAbstractFactory.CreateSzProduct(ctx)
failOnError(5008, err)

// Persist the Senzing configuration to the Senzing repository.

err = demonstrateConfigFunctions(ctx, szConfig, szConfigManager)
failOnError(5011, err)
failOnError(5009, err)

// Now that a Senzing configuration is installed, get the remainder of the Senzing objects.

szDiagnostic, err := szAbstractFactory.CreateSzDiagnostic(ctx)
failOnError(5012, err)
defer func() { deferredError(szDiagnostic.Destroy(ctx)) }()

szEngine, err := szAbstractFactory.CreateSzEngine(ctx)
failOnError(5014, err)
defer func() { deferredError(szEngine.Destroy(ctx)) }()

szProduct, err := szAbstractFactory.CreateSzProduct(ctx)
failOnError(5016, err)
defer func() { deferredError(szProduct.Destroy(ctx)) }()

// Demonstrate tests.

err = demonstrateAdditionalFunctions(ctx, szDiagnostic, szEngine, szProduct)
failOnError(5021, err)
failOnError(5010, err)

}
fmt.Printf("\n-------------------------------------------------------------------------------\n\n")
Expand Down
1 change: 0 additions & 1 deletion makefiles/darwin.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

SENZING_DIR ?= /opt/senzing/er
SENZING_TOOLS_SENZING_DIRECTORY ?= $(SENZING_DIR)

LD_LIBRARY_PATH ?= $(SENZING_TOOLS_SENZING_DIRECTORY)/lib:$(SENZING_TOOLS_SENZING_DIRECTORY)/lib/macos
DYLD_LIBRARY_PATH := $(LD_LIBRARY_PATH)
SENZING_TOOLS_DATABASE_URL ?= sqlite3://na:na@nowhere/tmp/sqlite/G2C.db
Expand Down
16 changes: 4 additions & 12 deletions szfactorycreator/szfactorycreator_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,12 @@ func ExampleCreateCoreAbstractFactory() {
if err != nil {
fmt.Println(err)
}
defer func() { handleError(szAbstractFactory.Destroy(ctx)) }()
szEngine, err := szAbstractFactory.CreateSzEngine(ctx)
if err != nil {
fmt.Println(err)
}
defer func() {
err := szEngine.Destroy(ctx)
if err != nil {
fmt.Println(err)
}
}()
_ = szEngine // Use szEngine.
// Output:
}

Expand All @@ -53,15 +49,11 @@ func ExampleCreateGrpcAbstractFactory() {
if err != nil {
fmt.Println(err)
}
defer func() { handleError(szAbstractFactory.Destroy(ctx)) }()
szEngine, err := szAbstractFactory.CreateSzEngine(ctx)
if err != nil {
fmt.Println(err)
}
defer func() {
err := szEngine.Destroy(ctx)
if err != nil {
fmt.Println(err)
}
}()
_ = szEngine // Use szEngine.
// Output:
}
15 changes: 9 additions & 6 deletions szfactorycreator/szfactorycreator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ func TestSzfactorycreator_CreateCoreAbstractFactory(test *testing.T) {
configID := senzing.SzInitializeWithDefaultConfiguration
szAbstractFactory, err := CreateCoreAbstractFactory(instanceName, settings, verboseLogging, configID)
require.NoError(test, err)
szEngine, err := szAbstractFactory.CreateSzEngine(ctx)
_, err = szAbstractFactory.CreateSzEngine(ctx)
require.NoError(test, err)
defer require.NoError(test, szEngine.Destroy(ctx))
}

func TestSzfactorycreator_CreateGrpcAbstractFactory(test *testing.T) {
Expand All @@ -36,16 +35,20 @@ func TestSzfactorycreator_CreateGrpcAbstractFactory(test *testing.T) {
require.NoError(test, err)
szAbstractFactory, err := CreateGrpcAbstractFactory(grpcConnection)
require.NoError(test, err)
szEngine, err := szAbstractFactory.CreateSzEngine(ctx)
_, err = szAbstractFactory.CreateSzEngine(ctx)
require.NoError(test, err)
defer require.NoError(test, szEngine.Destroy(ctx))
}

func TestSzfactorycreator_CreateMockAbstractFactory(test *testing.T) {
ctx := context.TODO()
szAbstractFactory, err := CreateMockAbstractFactory()
require.NoError(test, err)
szEngine, err := szAbstractFactory.CreateSzEngine(ctx)
_, err = szAbstractFactory.CreateSzEngine(ctx)
require.NoError(test, err)
defer require.NoError(test, szEngine.Destroy(ctx))
}

func handleError(err error) {
if err != nil {
panic(err)
}
}
Loading