diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 50c112b..1d4b2ad 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,3 +1,3 @@ # Default code owner -* @Senzing/go-developers +* @senzing-garage/senzing-go-developers diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index d3a80d7..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: - -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Desktop (please complete the following information):** - -- OS: [e.g. iOS] -- Browser [e.g. chrome, safari] -- Version [e.g. 22] - -**Smartphone (please complete the following information):** - -- Device: [e.g. iPhone6] -- OS: [e.g. iOS8.1] -- Browser [e.g. stock browser, safari] -- Version [e.g. 22] - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/documentation_request.md b/.github/ISSUE_TEMPLATE/documentation_request.md deleted file mode 100644 index c18a3fa..0000000 --- a/.github/ISSUE_TEMPLATE/documentation_request.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -name: Documentation request -about: Identify an area for improvement in documentation - ---- - -**What is the URL of the documentation?** - -- **Example:** https://github.com/Senzing/template-docker#external-database - - *Note:* This URL includes the web page and the section of the documentation. - -**What can be improved?** - -A clear and concise description of what can be improved. -Examples: - -- "I don't understand where the ${XYZ} variable is set." -- "There seems to be a step missing between 'X' and 'Z'. I don't know how to get to 'Z'." -- "When I run `command sub-command ...` I get the following error:" -- "I don't know what is meant by 'gerble barb gazoink` in the instructions". - -**Additional context** - -Add any other context or screenshots to help describe the documentation improvement. -If you think the documentation improvement is operating system specific, -please indicate which operating system is being used. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 066b2d9..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/add-dependabot-request-to-project-t-comm.yaml b/.github/workflows/add-dependabot-request-to-project-t-comm.yaml deleted file mode 100644 index 5d9cbcb..0000000 --- a/.github/workflows/add-dependabot-request-to-project-t-comm.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# Based on -# - https://github.com/srggrs/assign-one-project-github-action - -name: add-dependabot-request-to-project-t-comm.yaml - -on: - pull_request: - types: - - opened - - reopened - -env: - GITHUB_TOKEN: ${{ secrets.SENZING_GITHUB_ACCESS_TOKEN }} - CREATOR: ${{ github.event.pull_request.user.login }} - -jobs: - add-dependabot-request-to-project: - name: Add dependabot pull request to Senzing Community project - runs-on: ubuntu-latest - steps: - - name: Assign pull request to project - env: - BOOL: ${{ contains( env.CREATOR, 'dependabot' ) }} - uses: Senzing/github-action-add-issue-to-project@main - if: ${{ env.BOOL == 'true' }} - with: - project: "https://github.com/orgs/Senzing/projects/2" diff --git a/.github/workflows/add-issue-to-project-t-comm.yaml b/.github/workflows/add-issue-to-project-t-comm.yaml deleted file mode 100644 index 978d2b1..0000000 --- a/.github/workflows/add-issue-to-project-t-comm.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# Based on -# - https://github.com/srggrs/assign-one-project-github-action - -name: add-issue-to-project-t-comm.yaml - -on: - issues: - types: - - reopened - - opened - -env: - GITHUB_TOKEN: ${{ secrets.SENZING_GITHUB_ACCESS_TOKEN }} - -jobs: - add-issue-to-project: - name: Add issue to Senzing Community project - runs-on: ubuntu-latest - steps: - - name: Assign issue to project - uses: Senzing/github-action-add-issue-to-project@main - with: - project: "https://github.com/orgs/Senzing/projects/2" - column_name: "Backlog" diff --git a/.github/workflows/identify-customer.yaml b/.github/workflows/add-label-customer-submission.yaml similarity index 68% rename from .github/workflows/identify-customer.yaml rename to .github/workflows/add-label-customer-submission.yaml index 2e9a0da..f9dd8e8 100644 --- a/.github/workflows/identify-customer.yaml +++ b/.github/workflows/add-label-customer-submission.yaml @@ -1,21 +1,17 @@ -name: identify-customer.yaml - +name: add-label-customer-submission.yaml on: issues: types: - opened - env: - GITHUB_TOKEN: ${{ secrets.ORG_MEMBERSHIP_TOKEN }} MEMBER_LIST: ${{ secrets.SENZING_MEMBERS }} CREATOR: ${{ github.actor }} - jobs: - identify-customer: - name: Add customer-submission label + automate-issues-labels: + name: Add customer-submission label to issue runs-on: ubuntu-latest steps: - - name: initial labeling + - name: Add customer-submission label env: BOOL: ${{ contains( env.MEMBER_LIST, env.CREATOR ) }} if: ${{ env.BOOL == 'false' }} diff --git a/.github/workflows/add-triage-label.yaml b/.github/workflows/add-label-triage.yaml similarity index 51% rename from .github/workflows/add-triage-label.yaml rename to .github/workflows/add-label-triage.yaml index bdbefae..fc32b8c 100644 --- a/.github/workflows/add-triage-label.yaml +++ b/.github/workflows/add-label-triage.yaml @@ -1,21 +1,15 @@ -# Based on -# - https://docs.github.com/en/actions/guides/adding-labels-to-issues -# - https://github.com/andymckay/labeler - -name: add-triage-label.yaml - +name: add-label-triage.yaml on: issues: types: - reopened - opened - jobs: - add-triage-label: + automate-issues-labels: name: Add triage label to issue runs-on: ubuntu-latest steps: - - name: initial labeling + - name: Add triage label uses: andymckay/labeler@1.0.4 with: add-labels: "triage" diff --git a/.github/workflows/add-to-project-garage-dependabot.yaml b/.github/workflows/add-to-project-garage-dependabot.yaml new file mode 100644 index 0000000..91cb367 --- /dev/null +++ b/.github/workflows/add-to-project-garage-dependabot.yaml @@ -0,0 +1,21 @@ +name: add-to-project-garage-dependabot.yaml +on: + pull_request: + types: + - opened + - reopened +env: + CREATOR: ${{ github.event.pull_request.user.login }} +jobs: + add-to-project: + name: Add dependabot pull request to project + runs-on: ubuntu-latest + steps: + - name: Assign pull request to project + env: + BOOL: ${{ contains( env.CREATOR, 'dependabot' ) }} + if: ${{ env.BOOL == 'true' }} + uses: actions/add-to-project@v0.5.0 + with: + project-url: https://github.com/orgs/senzing-garage/projects/3 + github-token: ${{ secrets.SENZING_GITHUB_ACCESS_TOKEN }} diff --git a/.github/workflows/add-to-project-garage.yaml b/.github/workflows/add-to-project-garage.yaml new file mode 100644 index 0000000..4599e4e --- /dev/null +++ b/.github/workflows/add-to-project-garage.yaml @@ -0,0 +1,16 @@ +name: add-to-project-garage.yaml +on: + issues: + types: + - reopened + - opened +jobs: + add-to-project: + name: Add issue to project + runs-on: ubuntu-latest + steps: + - name: Assign issue to project + uses: actions/add-to-project@v0.5.0 + with: + project-url: https://github.com/orgs/senzing-garage/projects/3 + github-token: ${{ secrets.SENZING_GITHUB_ACCESS_TOKEN }} diff --git a/.github/workflows/dependabot-approve-and-merge.yaml b/.github/workflows/dependabot-approve-and-merge.yaml index 114db76..0c15821 100644 --- a/.github/workflows/dependabot-approve-and-merge.yaml +++ b/.github/workflows/dependabot-approve-and-merge.yaml @@ -1,15 +1,12 @@ ---- name: dependabot-approve-and-merge.yaml - on: pull_request: branches: [main] - jobs: dependabot-approve-and-merge: permissions: contents: write pull-requests: write - uses: Senzing/build-resources/.github/workflows/dependabot-approve-and-merge.yaml@main + uses: senzing-factory/build-resources/.github/workflows/dependabot-approve-and-merge.yaml@main secrets: SENZING_GITHUB_CODEOWNER_PR_RW_TOKEN: ${{ secrets.SENZING_GITHUB_CODEOWNER_PR_RW_TOKEN }} diff --git a/.github/workflows/docker-build-container.yaml b/.github/workflows/docker-build-container.yaml index 38abfd3..5acc8de 100644 --- a/.github/workflows/docker-build-container.yaml +++ b/.github/workflows/docker-build-container.yaml @@ -1,17 +1,15 @@ name: docker-build-container.yaml - on: pull_request: branches: - main workflow_dispatch: - jobs: docker-build-container: runs-on: ubuntu-latest steps: - name: Build docker image - uses: Senzing/github-action-docker-buildx-build@latest + uses: senzing-factory/github-action-docker-buildx-build@latest with: image-repository: senzing/explain password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} diff --git a/.github/workflows/go-proxy-pull.yaml b/.github/workflows/go-proxy-pull.yaml index ae86ab6..021ce40 100644 --- a/.github/workflows/go-proxy-pull.yaml +++ b/.github/workflows/go-proxy-pull.yaml @@ -5,12 +5,10 @@ # - https://futurestud.io/tutorials/github-actions-run-a-workflow-when-creating-a-tag name: go-proxy-pull.yaml - on: push: tags: - "v[0-9]+.[0-9]+.[0-9]+" - jobs: go-proxy-pull: runs-on: ubuntu-latest @@ -18,4 +16,4 @@ jobs: - name: Pull new module version uses: andrewslotin/go-proxy-pull-action@v1.1.0 with: - import_path: github.com/senzing/explain + import_path: github.com/senzing-garage/explain diff --git a/.github/workflows/go-test-darwin.yaml b/.github/workflows/go-test-darwin.yaml index b980a02..48e9421 100644 --- a/.github/workflows/go-test-darwin.yaml +++ b/.github/workflows/go-test-darwin.yaml @@ -2,9 +2,7 @@ # - https://github.com/marketplace/actions/setup-go-environment name: go-test-darwin.yaml - on: [push] - jobs: go-test-darwin: runs-on: ${{ matrix.os }} diff --git a/.github/workflows/go-test-linux.yaml b/.github/workflows/go-test-linux.yaml index 3350d52..2894ed4 100644 --- a/.github/workflows/go-test-linux.yaml +++ b/.github/workflows/go-test-linux.yaml @@ -2,9 +2,7 @@ # - https://github.com/marketplace/actions/setup-go-environment name: go-test-linux.yaml - on: [push] - jobs: go-test-linux: runs-on: ${{ matrix.os }} diff --git a/.github/workflows/go-test-windows.yaml b/.github/workflows/go-test-windows.yaml index a32df10..875f0e0 100644 --- a/.github/workflows/go-test-windows.yaml +++ b/.github/workflows/go-test-windows.yaml @@ -2,9 +2,7 @@ # - https://github.com/marketplace/actions/setup-go-environment name: go-test-windows.yaml - on: [push] - jobs: go-test-windows: runs-on: ${{ matrix.os }} diff --git a/.github/workflows/gofmt.yaml b/.github/workflows/gofmt.yaml index e803ad4..6bf9fbe 100644 --- a/.github/workflows/gofmt.yaml +++ b/.github/workflows/gofmt.yaml @@ -1,10 +1,7 @@ ---- name: gofmt.yaml - on: pull_request: branches: [main] - jobs: gofmt: - uses: Senzing/build-resources/.github/workflows/gofmt.yaml@main + uses: senzing-factory/build-resources/.github/workflows/gofmt.yaml@main diff --git a/.github/workflows/gosec.yaml b/.github/workflows/gosec.yaml index a4dc82c..42443d8 100644 --- a/.github/workflows/gosec.yaml +++ b/.github/workflows/gosec.yaml @@ -2,7 +2,6 @@ # - https://github.com/securego/gosec name: gosec.yaml - on: push: branches: @@ -10,7 +9,6 @@ on: pull_request: branches: - main - jobs: gosec: runs-on: ubuntu-latest diff --git a/.github/workflows/make-github-release-assets-darwin.yaml b/.github/workflows/make-github-release-assets-darwin.yaml index aff9d36..008c915 100644 --- a/.github/workflows/make-github-release-assets-darwin.yaml +++ b/.github/workflows/make-github-release-assets-darwin.yaml @@ -1,10 +1,8 @@ name: make-github-release-assets-darwin.yaml - on: push: tags: - "[0-9]+.[0-9]+.[0-9]+" - jobs: build: name: Publish binaries - darwin diff --git a/.github/workflows/make-github-release-assets.yaml b/.github/workflows/make-github-release-assets.yaml index 39fe50a..6a3f95d 100644 --- a/.github/workflows/make-github-release-assets.yaml +++ b/.github/workflows/make-github-release-assets.yaml @@ -1,10 +1,8 @@ name: make-github-release-assets.yaml - on: push: tags: - "[0-9]+.[0-9]+.[0-9]+" - jobs: build: name: Publish binaries diff --git a/.github/workflows/make-go-github-file.yaml b/.github/workflows/make-go-github-file.yaml index a01cde6..40b7ca7 100644 --- a/.github/workflows/make-go-github-file.yaml +++ b/.github/workflows/make-go-github-file.yaml @@ -1,15 +1,11 @@ ---- - name: make-go-github-file.yaml - on: push: tags: - "[0-9]+.[0-9]+.[0-9]+" - jobs: make-go-github-file: - uses: Senzing/build-resources/.github/workflows/make-go-github-file.yaml@main + uses: senzing-factory/build-resources/.github/workflows/make-go-github-file.yaml@main secrets: SENZING_GITHUB_GPG_PRIVATE_KEY: ${{ secrets.SENZING_GITHUB_GPG_PRIVATE_KEY }} SENZING_GITHUB_GPG_PASSPHRASE: ${{ secrets.SENZING_GITHUB_GPG_PASSPHRASE }} diff --git a/.github/workflows/make-go-tag.yaml b/.github/workflows/make-go-tag.yaml index 15d098c..ad7670f 100644 --- a/.github/workflows/make-go-tag.yaml +++ b/.github/workflows/make-go-tag.yaml @@ -1,10 +1,9 @@ name: make-go-tag.yaml - on: push: tags: - "[0-9]+.[0-9]+.[0-9]+" - +permissions: write-all jobs: make-go-tag: name: Make a vM.m.P tag @@ -13,4 +12,4 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - name: Make go version tag - uses: Senzing/github-action-make-go-tag@main + uses: senzing-factory/github-action-make-go-tag@main diff --git a/.github/workflows/move-pr-to-done.yaml b/.github/workflows/move-pr-to-done.yaml index a77c683..099d1b4 100644 --- a/.github/workflows/move-pr-to-done.yaml +++ b/.github/workflows/move-pr-to-done.yaml @@ -1,12 +1,9 @@ ---- name: move-pr-to-done.yaml - on: pull_request: types: [closed] - jobs: move-pr-to-done: - uses: Senzing/build-resources/.github/workflows/move-pr-to-done.yaml@main + uses: senzing-factory/build-resources/.github/workflows/move-pr-to-done.yaml@main secrets: SENZING_GITHUB_PROJECT_RW_TOKEN: ${{ secrets.SENZING_GITHUB_PROJECT_RW_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 633bd2c..2ec4513 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,13 +8,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.2.0] - 2024-01-02 + +### Changed in 0.2.0 + +- Renamed module to `github.com/senzing-garage/explain` +- Refactor to [template-go](https://github.com/senzing-garage/template-go) +- Update dependencies + - github.com/spf13/cobra v1.8.0 + - github.com/spf13/viper v1.18.2 + ## [0.1.5] - 2023-10-20 ### Changed in 0.1.5 -- Refactor to [template-go](https://github.com/Senzing/template-go) +- Refactor to [template-go](https://github.com/senzing-garage/template-go) - Update dependencies - - github.com/senzing/go-cmdhelping v0.1.9 + - github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c + - github.com/senzing-garage/go-cmdhelping v0.2.0 - github.com/spf13/viper v1.17.0 ## [0.1.4] - 2023-08-07 @@ -23,7 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Refactor to `template-go` - Update dependencies - - github.com/senzing/go-cmdhelping v0.1.5 + - github.com/senzing-garage/go-cmdhelping v0.1.5 ## [0.1.3] - 2023-07-26 @@ -41,7 +52,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed in 0.1.1 - Updated dependencies - - github.com/senzing/go-cmdhelping v0.1.0 + - github.com/senzing-garage/go-cmdhelping v0.1.0 ## [0.1.0] - 2023-07-18 diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index f6f9f91..a8f1a17 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -34,7 +34,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe ## Enforcement -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at support@senzing.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at . The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index be38378..18b3ecd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -82,7 +82,7 @@ These variables may be modified, but do not need to be modified. The variables are used throughout the installation procedure. ```console -export GIT_ACCOUNT=senzing +export GIT_ACCOUNT=senzing-garage export GIT_REPOSITORY=explain ``` diff --git a/Dockerfile b/Dockerfile index bf8b552..f924153 100755 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,8 @@ # Stages # ----------------------------------------------------------------------------- -ARG IMAGE_GO_BUILDER=golang:1.21.0-bullseye -ARG IMAGE_FINAL=senzing/senzingapi-runtime:3.7.1 +ARG IMAGE_GO_BUILDER=golang:1.21.4-bullseye +ARG IMAGE_FINAL=senzing/senzingapi-runtime:3.8.0 # ----------------------------------------------------------------------------- # Stage: go_builder diff --git a/Makefile b/Makefile index 067bed5..fc2a9c5 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ # Detect the operating system and architecture. -include Makefile.osdetect +include makefiles/osdetect.mk # ----------------------------------------------------------------------------- # Variables @@ -12,7 +12,7 @@ include Makefile.osdetect # PROGRAM_NAME is the name of the GIT repository. PROGRAM_NAME := $(shell basename `git rev-parse --show-toplevel`) -MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) +MAKEFILE_PATH := $(abspath $(firstword $(MAKEFILE_LIST))) MAKEFILE_DIRECTORY := $(shell dirname $(MAKEFILE_PATH)) TARGET_DIRECTORY := $(MAKEFILE_DIRECTORY)/target DOCKER_CONTAINER_NAME := $(PROGRAM_NAME) @@ -51,8 +51,8 @@ default: help # Operating System / Architecture targets # ----------------------------------------------------------------------------- --include Makefile.$(OSTYPE) --include Makefile.$(OSTYPE)_$(OSARCH) +-include makefiles/$(OSTYPE).mk +-include makefiles/$(OSTYPE)_$(OSARCH).mk .PHONY: hello-world @@ -73,7 +73,7 @@ dependencies: # - docker-build: https://docs.docker.com/engine/reference/commandline/build/ # ----------------------------------------------------------------------------- -PLATFORMS := darwin/amd64 linux/amd64 windows/amd64 +PLATFORMS := darwin/amd64 darwin/arm64 linux/amd64 linux/arm64 windows/amd64 windows/arm64 $(PLATFORMS): @echo Building $(TARGET_DIRECTORY)/$(GO_OS)-$(GO_ARCH)/$(PROGRAM_NAME) @GOOS=$(GO_OS) GOARCH=$(GO_ARCH) go build -o $(TARGET_DIRECTORY)/$(GO_OS)-$(GO_ARCH)/$(PROGRAM_NAME) diff --git a/Makefile.osdetect b/Makefile.osdetect deleted file mode 100644 index 7838924..0000000 --- a/Makefile.osdetect +++ /dev/null @@ -1,31 +0,0 @@ -ifeq ($(OS),Windows_NT) - OSTYPE = windows - ifeq ($(PROCESSOR_ARCHITECTURE), AMD64) - OSARCH = x86_64 - endif - ifeq ($(PROCESSOR_ARCHITECTURE), ARM64) - OSARCH = arm4 - endif -else - UNAME_OSTYPE = $(shell uname -s) - ifeq ($(UNAME_OSTYPE),Linux) - OSTYPE = linux - UNAME_ARCH = $(shell uname -p) - ifeq ($(UNAME_ARCH),x86_64) - OSARCH = x86_64 - endif - ifeq ($(UNAME_ARCH),arm64) - OSARCH = arm64 - endif - endif - ifeq ($(UNAME_OSTYPE),Darwin) - OSTYPE = darwin - UNAME_ARCH = $(shell uname -m) - ifeq ($(UNAME_ARCH),x86_64) - OSARCH = x86_64 - endif - ifeq ($(UNAME_ARCH),arm64) - OSARCH = arm64 - endif - endif -endif diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 0b11a2f..0000000 --- a/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,13 +0,0 @@ -# Pull request questions - -## Which issue does this address - -Issue number: #nnn - -## Why was change needed - -??? - -## What does change improve - -??? diff --git a/README.md b/README.md index ffd6aec..3e4cf37 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,17 @@ # explain +If you are beginning your journey with +[Senzing](https://senzing.com/), +please start with +[Senzing Quick Start guides](https://docs.senzing.com/quickstart/). + +You are in the +[Senzing Garage](https://github.com/senzing-garage) +where projects are "tinkered" on. +Although this GitHub repository may help you understand an approach to using Senzing, +it's not considered to be "production ready" and is not considered to be part of the Senzing product. +Heck, it may not even be appropriate for your application of Senzing! + ## :warning: WARNING: explain is still in development :warning: _ At the moment, this is "work-in-progress" with Semantic Versions of `0.n.x`. @@ -9,14 +21,18 @@ the recommendation is not to use it yet. ## Synopsis `explain` is a command in the -[senzing-tools](https://github.com/Senzing/senzing-tools) +[senzing-tools](https://github.com/senzing-garage/senzing-tools) suite of tools. It is used to explain aspects of `senzing-tools`. -[![Go Reference](https://pkg.go.dev/badge/github.com/senzing/explain.svg)](https://pkg.go.dev/github.com/senzing/explain) -[![Go Report Card](https://goreportcard.com/badge/github.com/senzing/explain)](https://goreportcard.com/report/github.com/senzing/explain) -[![go-test.yaml](https://github.com/Senzing/explain/actions/workflows/go-test.yaml/badge.svg)](https://github.com/Senzing/explain/actions/workflows/go-test.yaml) -[![License](https://img.shields.io/badge/License-Apache2-brightgreen.svg)](https://github.com/Senzing/explain/blob/main/LICENSE) +[![Go Reference](https://pkg.go.dev/badge/github.com/senzing-garage/explain.svg)](https://pkg.go.dev/github.com/senzing-garage/explain) +[![Go Report Card](https://goreportcard.com/badge/github.com/senzing-garage/explain)](https://goreportcard.com/report/github.com/senzing-garage/explain) +[![License](https://img.shields.io/badge/License-Apache2-brightgreen.svg)](https://github.com/senzing-garage/explain/blob/main/LICENSE) + +[![gosec.yaml](https://github.com/senzing-garage/explain/actions/workflows/gosec.yaml/badge.svg)](https://github.com/senzing-garage/explain/actions/workflows/gosec.yaml) +[![go-test-linux.yaml](https://github.com/senzing-garage/explain/actions/workflows/go-test-linux.yaml/badge.svg)](https://github.com/senzing-garage/explain/actions/workflows/go-test-linux.yaml) +[![go-test-darwin.yaml](https://github.com/senzing-garage/explain/actions/workflows/go-test-darwin.yaml/badge.svg)](https://github.com/senzing-garage/explain/actions/workflows/go-test-darwin.yaml) +[![go-test-windows.yaml](https://github.com/senzing-garage/explain/actions/workflows/go-test-windows.yaml/badge.svg)](https://github.com/senzing-garage/explain/actions/workflows/go-test-windows.yaml) ## Overview @@ -32,9 +48,9 @@ It is used to explain aspects of `senzing-tools`. ## Install 1. The `explain` command is installed with the - [senzing-tools](https://github.com/Senzing/senzing-tools) + [senzing-tools](https://github.com/senzing-garage/senzing-tools) suite of tools. - See senzing-tools [install](https://github.com/Senzing/senzing-tools#install). + See senzing-tools [install](https://github.com/senzing-garage/senzing-tools#install). ## Use @@ -98,10 +114,10 @@ This usage shows how to initialze a database with a Docker container. ### Parameters -- **[LD_LIBRARY_PATH](https://github.com/Senzing/knowledge-base/blob/main/lists/environment-variables.md#ld_library_path)** -- **[SENZING_TOOLS_COMMAND](https://github.com/Senzing/knowledge-base/blob/main/lists/environment-variables.md#senzing_tools_command)** -- **[SENZING_TOOLS_ERROR_ID](https://github.com/Senzing/knowledge-base/blob/main/lists/environment-variables.md#senzing_tools_error_id)** -- **[SENZING_TOOLS_TTY_ONLY](https://github.com/Senzing/knowledge-base/blob/main/lists/environment-variables.md#senzing_tools_tty_only)** +- **[LD_LIBRARY_PATH](https://github.com/senzing-garage/knowledge-base/blob/main/lists/environment-variables.md#ld_library_path)** +- **[SENZING_TOOLS_COMMAND](https://github.com/senzing-garage/knowledge-base/blob/main/lists/environment-variables.md#senzing_tools_command)** +- **[SENZING_TOOLS_ERROR_ID](https://github.com/senzing-garage/knowledge-base/blob/main/lists/environment-variables.md#senzing_tools_error_id)** +- **[SENZING_TOOLS_TTY_ONLY](https://github.com/senzing-garage/knowledge-base/blob/main/lists/environment-variables.md#senzing_tools_tty_only)** ## References diff --git a/cmd/context_darwin.go b/cmd/context_darwin.go index 0b629a6..0b32639 100644 --- a/cmd/context_darwin.go +++ b/cmd/context_darwin.go @@ -2,6 +2,6 @@ package cmd -import "github.com/senzing/go-cmdhelping/option" +import "github.com/senzing-garage/go-cmdhelping/option" var ContextVariablesForOsArch = []option.ContextVariable{} diff --git a/cmd/context_linux.go b/cmd/context_linux.go index 9a9c1a3..824b061 100644 --- a/cmd/context_linux.go +++ b/cmd/context_linux.go @@ -2,6 +2,6 @@ package cmd -import "github.com/senzing/go-cmdhelping/option" +import "github.com/senzing-garage/go-cmdhelping/option" var ContextVariablesForOsArch = []option.ContextVariable{} diff --git a/cmd/context_windows.go b/cmd/context_windows.go index a9f8846..484a945 100644 --- a/cmd/context_windows.go +++ b/cmd/context_windows.go @@ -2,6 +2,6 @@ package cmd -import "github.com/senzing/go-cmdhelping/option" +import "github.com/senzing-garage/go-cmdhelping/option" var ContextVariablesForOsArch = []option.ContextVariable{} diff --git a/cmd/root.go b/cmd/root.go index c5f75ad..3943b74 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -6,9 +6,9 @@ import ( "context" "os" - "github.com/senzing/explain/explainer" - "github.com/senzing/go-cmdhelping/cmdhelper" - "github.com/senzing/go-cmdhelping/option" + "github.com/senzing-garage/explain/explainer" + "github.com/senzing-garage/go-cmdhelping/cmdhelper" + "github.com/senzing-garage/go-cmdhelping/option" "github.com/spf13/cobra" "github.com/spf13/viper" ) diff --git a/doc.go b/doc.go index 38d8d77..45eaefa 100644 --- a/doc.go +++ b/doc.go @@ -7,7 +7,7 @@ One or two paragraph overview of this module... (This page describes the nature of the entire Go module or the top-level command, not an individual package.) -More information at https://github.com/senzing/explain +More information at https://github.com/senzing-garage/explain # Example Package @@ -16,7 +16,7 @@ documentation, tests, and examples should be done. This paragraph (or two) should provide a brief overview while linking the reader to the documentation included in the package itself. -More information can be found in the [pkg/github.com/senzing/explain/examplepackage] documentation. +More information can be found in the [pkg/github.com/senzing-garage/explain/examplepackage] documentation. # Another Header: Package or other module features... @@ -33,8 +33,8 @@ Examples of use can be seen in the main_test.go files. import ( fmt - "github.com/senzing/explain/examplepackage" - "github.com/senzing/explain/anotherpackage" + "github.com/senzing-garage/explain/examplepackage" + "github.com/senzing-garage/explain/anotherpackage" ) func main() { diff --git a/docs/development.md b/docs/development.md index ff64f0e..3e32e8f 100644 --- a/docs/development.md +++ b/docs/development.md @@ -14,7 +14,7 @@ Since the Senzing library is a prerequisite, it must be installed first. 1. `/etc/opt/senzing` 1. If not installed, see - [How to Install Senzing for Go Development](https://github.com/Senzing/knowledge-base/blob/main/HOWTO/install-senzing-for-go-development.md). + [How to Install Senzing for Go Development](https://github.com/senzing-garage/knowledge-base/blob/main/HOWTO/install-senzing-for-go-development.md). ## Install Git repository @@ -29,7 +29,7 @@ Since the Senzing library is a prerequisite, it must be installed first. ``` 1. Using the environment variables values just set, follow steps in - [clone-repository](https://github.com/Senzing/knowledge-base/blob/main/HOWTO/clone-repository.md) to install the Git repository. + [clone-repository](https://github.com/senzing-garage/knowledge-base/blob/main/HOWTO/clone-repository.md) to install the Git repository. ## Build @@ -95,7 +95,7 @@ Since the Senzing library is a prerequisite, it must be installed first. 1. When a versioned release is published with a `v0.0.0` format tag, the reference can be found by clicking on the following badge at the top of the README.md page: -[![Go Reference](https://pkg.go.dev/badge/github.com/senzing/explain.svg)](https://pkg.go.dev/github.com/senzing/explain) +[![Go Reference](https://pkg.go.dev/badge/github.com/senzing-garage/explain.svg)](https://pkg.go.dev/github.com/senzing-garage/explain) ## Docker diff --git a/explainer/doc.go b/explainer/doc.go index 9973909..107ba9e 100644 --- a/explainer/doc.go +++ b/explainer/doc.go @@ -6,7 +6,7 @@ One or two sentence synopsis of the package... One or two paragraph overview of the package... (This page describes the nature of the individual package.) -More information at https://github.com/senzing/explain +More information at https://github.com/senzing-garage/explain # Another Header @@ -23,7 +23,7 @@ Examples of use can be seen in the examplepackage_test.go files. import ( fmt - "github.com/senzing/explain/examplepackage" + "github.com/senzing-garage/explain/examplepackage" ) func main() { diff --git a/explainer/explainer_error_test.go b/explainer/explainer_error_test.go index eb4c7e5..a514c99 100644 --- a/explainer/explainer_error_test.go +++ b/explainer/explainer_error_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/senzing/explain/explainer" + "github.com/senzing-garage/explain/explainer" "github.com/stretchr/testify/assert" ) @@ -27,7 +27,7 @@ func TestExplainerError(test *testing.T) { // ---------------------------------------------------------------------------- func ExampleExplainerError() { - // For more information, visit https://github.com/Senzing/explain/blob/main/explainer/explainer_error_test.go + // For more information, visit https://github.com/senzing-garage/explain/blob/main/explainer/explainer_error_test.go ctx := context.TODO() explainer := &explainer.ExplainerError{ ErrorId: "senzing-60010000", diff --git a/explainer/explainer_null_test.go b/explainer/explainer_null_test.go index 9d398ce..15fce9c 100644 --- a/explainer/explainer_null_test.go +++ b/explainer/explainer_null_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/senzing/explain/explainer" + "github.com/senzing-garage/explain/explainer" "github.com/stretchr/testify/assert" ) @@ -27,7 +27,7 @@ func TestExplainerNull(test *testing.T) { // ---------------------------------------------------------------------------- func ExampleExplainerNull() { - // For more information, visit https://github.com/Senzing/explain/blob/main/explainer/explainer_error_test.go + // For more information, visit https://github.com/senzing-garage/explain/blob/main/explainer/explainer_error_test.go ctx := context.TODO() explainer := &explainer.ExplainerError{ ErrorId: "senzing-60010000", diff --git a/go.mod b/go.mod index 312b602..2e2039c 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,10 @@ -module github.com/senzing/explain +module github.com/senzing-garage/explain go 1.21 require ( - github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 - github.com/senzing/go-cmdhelping v0.1.9 + github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c + github.com/senzing-garage/go-cmdhelping v0.2.0 github.com/spf13/cobra v1.8.0 github.com/spf13/viper v1.18.2 github.com/stretchr/testify v1.8.4 @@ -18,7 +18,7 @@ require ( 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.0 // indirect + github.com/pelletier/go-toml/v2 v2.1.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect @@ -29,7 +29,7 @@ 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-20231006140011-7918f672742d // indirect + golang.org/x/exp v0.0.0-20231226003508-02704c960a9b // indirect golang.org/x/sys v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/go.sum b/go.sum index f7a0337..96b18da 100644 --- a/go.sum +++ b/go.sum @@ -22,10 +22,10 @@ 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.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= -github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= +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/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= 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= @@ -37,8 +37,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/go-cmdhelping v0.1.9 h1:hUU7YH7BPeh8BmrH1WlrS/EfXmTeX3RY2zEv7rUM/6M= -github.com/senzing/go-cmdhelping v0.1.9/go.mod h1:n2BQAfW7+Er8Y4xobhNUZkuP1PWnHKsdqRxTC/IE4vc= +github.com/senzing-garage/go-cmdhelping v0.2.0 h1:c1T1v+FUtQ31Lzo7VXmSKGEuIBXPi4RGPjnwy+Lt3Ao= +github.com/senzing-garage/go-cmdhelping v0.2.0/go.mod h1:+IYFvjFPJlF1Nfxq0RdWqePj8NzPPKEOCYPTLCtk/ic= 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= @@ -62,9 +62,9 @@ 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-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= -golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= -golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +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.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= diff --git a/main.go b/main.go index 55bfbff..72f54c4 100644 --- a/main.go +++ b/main.go @@ -5,7 +5,7 @@ package main import ( "log" - "github.com/senzing/explain/cmd" + "github.com/senzing-garage/explain/cmd" ) func main() { diff --git a/Makefile.darwin b/makefiles/darwin.mk similarity index 98% rename from Makefile.darwin rename to makefiles/darwin.mk index a3f78a6..74e17f6 100644 --- a/Makefile.darwin +++ b/makefiles/darwin.mk @@ -6,7 +6,7 @@ # ----------------------------------------------------------------------------- -# OS-ARCH specific targets +# OS specific targets # ----------------------------------------------------------------------------- .PHONY: build-osarch-specific diff --git a/Makefile.linux b/makefiles/linux.mk similarity index 98% rename from Makefile.linux rename to makefiles/linux.mk index a3172d8..71267ac 100644 --- a/Makefile.linux +++ b/makefiles/linux.mk @@ -6,7 +6,7 @@ # ----------------------------------------------------------------------------- -# OS-ARCH specific targets +# OS specific targets # ----------------------------------------------------------------------------- .PHONY: build-osarch-specific diff --git a/makefiles/osdetect.mk b/makefiles/osdetect.mk new file mode 100644 index 0000000..3c438cb --- /dev/null +++ b/makefiles/osdetect.mk @@ -0,0 +1,15 @@ +ifeq ($(OS),Windows_NT) + OSTYPE = windows + ifeq ($(PROCESSOR_ARCHITECTURE), AMD64) + OSARCH = x86_64 + endif + ifeq ($(PROCESSOR_ARCHITECTURE), ARM64) + OSARCH = arm4 + endif +else + OSTYPE = $(shell uname -s | tr '[:upper:]' '[:lower:]') + OSARCH = $(shell uname -m | tr '[:upper:]' '[:lower:]') + ifeq ($(OSARCH),aarch64) + OSARCH = arm64 + endif +endif diff --git a/Makefile.windows b/makefiles/windows.mk similarity index 97% rename from Makefile.windows rename to makefiles/windows.mk index 387042d..4c8215f 100644 --- a/Makefile.windows +++ b/makefiles/windows.mk @@ -6,7 +6,7 @@ # ----------------------------------------------------------------------------- -# OS-ARCH specific targets +# OS specific targets # ----------------------------------------------------------------------------- .PHONY: build-osarch-specific