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

#59 Prepare for versioned release #60

Merged
merged 5 commits into from
Apr 19, 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
2 changes: 1 addition & 1 deletion .github/workflows/gosec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
GO111MODULE: on

steps:
- name: checkout Source
- name: checkout repository
uses: actions/checkout@v4

- name: run Gosec Security Scanner
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

-

## [0.2.1] - 2024-04-19

### Changed in 0.2.1

- Migrated from `G2` to `Sz` prefixes
- Update dependencies
- github.com/senzing-garage/go-helpers v0.5.1
- github.com/stretchr/testify v1.9.0

## [0.2.0] - 2024-01-02

- Migrated from `github.com/senzing-garage/go-common` to `github.com/senzing-garage/go-helpers`

### Changed in 0.2.0

- Renamed module to `github.com/senzing-garage/go-cmdhelping`
Expand Down
8 changes: 4 additions & 4 deletions engineconfiguration/engineconfiguration.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"

"github.com/senzing-garage/go-cmdhelping/option"
"github.com/senzing-garage/go-common/g2engineconfigurationjson"
"github.com/senzing-garage/go-helpers/engineconfigurationjson"
"github.com/spf13/viper"
)

Expand All @@ -29,14 +29,14 @@ func BuildSenzingEngineConfigurationJson(ctx context.Context, aViper *viper.Vipe
}
}
}
result, err = g2engineconfigurationjson.BuildSimpleSystemConfigurationJsonUsingMap(options)
result, err = engineconfigurationjson.BuildSimpleSystemConfigurationJsonUsingMap(options)
}
return result, err
}

// Convenience method for g2engineconfigurationjson.VerifySenzingEngineConfigurationJson
// Convenience method for engineconfigurationjson.VerifySenzingEngineConfigurationJson
func VerifySenzingEngineConfigurationJson(ctx context.Context, engineConfigurationJson string) error {
return g2engineconfigurationjson.VerifySenzingEngineConfigurationJson(ctx, engineConfigurationJson)
return engineconfigurationjson.VerifySenzingEngineConfigurationJson(ctx, engineConfigurationJson)
}

// Given variables in Viper, construct and verify the Senzing engine configuration JSON.
Expand Down
9 changes: 5 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/senzing-garage/go-cmdhelping
go 1.21

require (
github.com/senzing-garage/go-common v0.4.0
github.com/senzing-garage/go-helpers v0.5.1
github.com/spf13/cobra v1.8.0
github.com/spf13/viper v1.18.2
github.com/stretchr/testify v1.9.0
Expand All @@ -12,11 +12,12 @@ require (
require (
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml/v2 v2.1.1 // indirect
github.com/pelletier/go-toml/v2 v2.2.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
Expand All @@ -27,8 +28,8 @@ require (
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
Expand Down
21 changes: 11 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHk
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
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/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
Expand All @@ -24,8 +24,8 @@ github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0V
github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI=
github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc=
github.com/pelletier/go-toml/v2 v2.2.1 h1:9TA9+T8+8CUCO2+WYnDLCgrYi9+omqKXyjDtosvtEhg=
github.com/pelletier/go-toml/v2 v2.2.1/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
Expand All @@ -36,8 +36,8 @@ github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6ke
github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4=
github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE=
github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ=
github.com/senzing-garage/go-common v0.4.0 h1:/6/5yNY80udkbOzSAX0Vvx2+0kD9JF7fhqNUlRj2Vho=
github.com/senzing-garage/go-common v0.4.0/go.mod h1:f2EIjPzAcULG8eKUVebIUNS2qgMVcJRgmQY9fpBDF9E=
github.com/senzing-garage/go-helpers v0.5.1 h1:ezVW5oAHihfG2QVpe/Ooyz8q9UPrCuDdg+W43wk9phY=
github.com/senzing-garage/go-helpers v0.5.1/go.mod h1:Gx66fvdAqt4YVf1KVCjzK2Rmr/C7qe5zaZW4VQ3goyM=
github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=
github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0=
github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8=
Expand All @@ -53,6 +53,7 @@ github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMV
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
Expand All @@ -62,10 +63,10 @@ github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b h1:kLiC65FbiHWFAOu+lxwNPujcsl8VYyTYYEZnsOO1WK4=
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI=
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f h1:99ci1mjWVBWwJiEKYY6jWa4d2nTQVIEhZIptnrVb1XY=
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI=
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
50 changes: 25 additions & 25 deletions option/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,43 +62,43 @@ var EnableAll = ContextVariable{
Type: optiontype.Bool,
}

var EnableG2config = ContextVariable{
Arg: "enable-g2config",
Default: OsLookupEnvBool("SENZING_TOOLS_ENABLE_G2CONFIG", false),
Envar: "SENZING_TOOLS_ENABLE_G2CONFIG",
Help: "Enable G2Config service [%s]",
var EnableSzConfig = ContextVariable{
Arg: "enable-szconfig",
Default: OsLookupEnvBool("SENZING_TOOLS_ENABLE_SZCONFIG", false),
Envar: "SENZING_TOOLS_ENABLE_SZCONFIG",
Help: "Enable SzConfig service [%s]",
Type: optiontype.Bool,
}

var EnableG2configmgr = ContextVariable{
Arg: "enable-g2configmgr",
Default: OsLookupEnvBool("SENZING_TOOLS_ENABLE_G2CONFIGMGR", false),
Envar: "SENZING_TOOLS_ENABLE_G2CONFIGMGR",
Help: "Enable G2ConfigMgr service [%s]",
var EnableSzConfigManager = ContextVariable{
Arg: "enable-szconfigmanager",
Default: OsLookupEnvBool("SENZING_TOOLS_ENABLE_SZCONFIGMANAGER", false),
Envar: "SENZING_TOOLS_ENABLE_SZCONFIGMANAGER",
Help: "Enable SZConfigManager service [%s]",
Type: optiontype.Bool,
}

var EnableG2diagnostic = ContextVariable{
Arg: "enable-g2diagnostic",
Default: OsLookupEnvBool("SENZING_TOOLS_ENABLE_G2DIAGNOSTIC", false),
Envar: "SENZING_TOOLS_ENABLE_G2DIAGNOSTIC",
Help: "Enable G2Diagnostic service [%s]",
var EnableSzDiagnostic = ContextVariable{
Arg: "enable-szdiagnostic",
Default: OsLookupEnvBool("SENZING_TOOLS_ENABLE_SZDIAGNOSTIC", false),
Envar: "SENZING_TOOLS_ENABLE_SZDIAGNOSTIC",
Help: "Enable SzDiagnostic service [%s]",
Type: optiontype.Bool,
}

var EnableG2engine = ContextVariable{
Arg: "enable-g2engine",
Default: OsLookupEnvBool("SENZING_TOOLS_ENABLE_G2ENGINE", false),
Envar: "SENZING_TOOLS_ENABLE_G2ENGINE",
Help: "Enable G2Config service [%s]",
var EnableSzEngine = ContextVariable{
Arg: "enable-szengine",
Default: OsLookupEnvBool("SENZING_TOOLS_ENABLE_SZENGINE", false),
Envar: "SENZING_TOOLS_ENABLE_SZENGINE",
Help: "Enable SzEngine service [%s]",
Type: optiontype.Bool,
}

var EnableG2product = ContextVariable{
Arg: "enable-g2product",
Default: OsLookupEnvBool("SENZING_TOOLS_ENABLE_G2PRODUCT", false),
Envar: "SENZING_TOOLS_ENABLE_G2PRODUCT",
Help: "Enable G2Config service [%s]",
var EnableSzProduct = ContextVariable{
Arg: "enable-szproduct",
Default: OsLookupEnvBool("SENZING_TOOLS_ENABLE_SZPRODUCT", false),
Envar: "SENZING_TOOLS_ENABLE_SZPRODUCT",
Help: "Enable SZProduct service [%s]",
Type: optiontype.Bool,
}

Expand Down