Skip to content

Commit

Permalink
Merge pull request #30 from Senzing/29.dockter.1
Browse files Browse the repository at this point in the history
29.dockter.1
  • Loading branch information
docktermj authored Aug 18, 2023
2 parents bcfa879 + 47cacea commit e8b7096
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go-test-darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
go: ["1.20"]
go: ["1.20", "1.21"]
name: Go ${{ matrix.go }} - darwin
steps:
- name: Checkout repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go-test-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: ["1.20"]
go: ["1.20", "1.21"]
name: Go ${{ matrix.go }} - linux
steps:
- name: Checkout repository
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

-

## [0.1.7] - 2023-08-18

### Changed in 0.1.7

- In `go.mod` update to `go 1.21`
- Improved `engineconfiguration`

## [0.1.6] - 2023-08-16

### Changed in 0.1.6
Expand Down
22 changes: 15 additions & 7 deletions engineconfiguration/engineconfiguration.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,21 @@ func BuildSenzingEngineConfigurationJson(ctx context.Context, aViper *viper.Vipe
var err error = nil
result := aViper.GetString(option.EngineConfigurationJson.Arg)
if len(result) == 0 {
options := map[string]string{
"configPath": aViper.GetString(option.ConfigPath.Arg),
"databaseUrl": aViper.GetString(option.DatabaseUrl.Arg),
"licenseStringBase64": aViper.GetString(option.LicenseStringBase64.Arg),
"resourcePath": aViper.GetString(option.ResourcePath.Arg),
"senzingDirectory": aViper.GetString(option.SenzingDirectory.Arg),
"supportPath": aViper.GetString(option.SupportPath.Arg),
optionsList := map[string]option.ContextVariable{
"configPath": option.ConfigPath,
"databaseUrl": option.DatabaseUrl,
"licenseStringBase64": option.LicenseStringBase64,
"resourcePath": option.ResourcePath,
"senzingDirectory": option.SenzingDirectory,
"supportPath": option.SupportPath,
}
options := map[string]string{}
for key, contextVariable := range optionsList {
if aViper.IsSet(contextVariable.Arg) {
if aViper.GetString(contextVariable.Arg) != contextVariable.Default {
options[key] = aViper.GetString(contextVariable.Arg)
}
}
}
result, err = g2engineconfigurationjson.BuildSimpleSystemConfigurationJsonUsingMap(options)
}
Expand Down
3 changes: 1 addition & 2 deletions engineconfiguration/engineconfiguration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestBuildSenzingEngineConfigurationJson(test *testing.T) {

var contextVariables = []option.ContextVariable{
option.ConfigPath.SetDefault("/tmp/ConfigPath"),
option.DatabaseUrl,
option.DatabaseUrl.SetDefault("sqlite3://na:na@/tmp/sqlite/G2C.db"),
option.LicenseStringBase64.SetDefault("ABCD12134"),
option.ResourcePath.SetDefault("/tmp/ResourcePath"),
option.SenzingDirectory,
Expand All @@ -38,5 +38,4 @@ func TestBuildSenzingEngineConfigurationJson(test *testing.T) {
if err != nil {
panic(err)
}

}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/senzing/go-cmdhelping

go 1.20
go 1.21

require (
github.com/senzing/go-common v0.2.13
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY=
github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
Expand Down Expand Up @@ -99,6 +100,7 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
Expand Down Expand Up @@ -132,9 +134,11 @@ github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=
github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
Expand Down

0 comments on commit e8b7096

Please sign in to comment.