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/go-proxy-pull.yaml b/.github/workflows/go-proxy-pull.yaml index 8954bea..04195b5 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 + import_path: github.com/senzing-garage/go-logging 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-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 c35146a..b99674c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,18 +10,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed in 1.3.3 -- 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-messaging v0.3.3 + - github.com/senzing-garage/go-messaging v0.3.3 - golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 ## [1.3.2] - 2023-08-04 ### Changed in 1.3.2 -- 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-messaging v0.3.2 + - github.com/senzing-garage/go-messaging v0.3.2 - golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b ## [1.3.1] - 2023-07-13 @@ -29,13 +29,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed in 1.3.1 - Update dependencies - - github.com/senzing/go-messaging v0.3.1 + - github.com/senzing-garage/go-messaging v0.3.1 ## [1.3.0] - 2023-07-06 ### Changed in 1.3.0 -- Using "github.com/senzing/go-messaging/messenger" to manage message format. +- Using "github.com/senzing-garage/go-messaging/messenger" to manage message format. ### Deleted in 1.3.0 @@ -58,7 +58,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed in 1.2.6 - Update dependencies - - github.com/senzing/go-messaging v0.2.2 + - github.com/senzing-garage/go-messaging v0.2.2 - github.com/stretchr/testify v1.8.4 - golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 @@ -80,7 +80,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed in 1.2.3 - Update dependencies - - github.com/senzing/go-messaging v0.2.1 + - github.com/senzing-garage/go-messaging v0.2.1 ## [1.2.2] - 2023-05-11 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 e1b7bd8..1d81611 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=go-logging ``` diff --git a/Makefile b/Makefile index 8e8fe13..22bcbaf 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 BUILD_VERSION := $(shell git describe --always --tags --abbrev=0 --dirty | sed 's/v//') @@ -42,8 +42,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 @@ -64,7 +64,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) @@ -77,6 +77,7 @@ build: build-osarch-specific .PHONY: build-all $(PLATFORMS) build-all: $(PLATFORMS) @mv $(TARGET_DIRECTORY)/windows-amd64/$(PROGRAM_NAME) $(TARGET_DIRECTORY)/windows-amd64/$(PROGRAM_NAME).exe + @mv $(TARGET_DIRECTORY)/windows-arm64/$(PROGRAM_NAME) $(TARGET_DIRECTORY)/windows-arm64/$(PROGRAM_NAME).exe .PHONY: build-scratch 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 b036d8e..0f3100d 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,30 @@ # go-logging +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! + ## Synopsis The `go-logging` packages build a logging system upon Go's experimental `slog` package (). -[![Go Reference](https://pkg.go.dev/badge/github.com/senzing/go-logging.svg)](https://pkg.go.dev/github.com/senzing/go-logging) -[![GoReportCard example](https://goreportcard.com/badge/github.com/senzing/go-logging)](https://goreportcard.com/report/github.com/senzing/go-logging) -[![go-test.yaml](https://github.com/Senzing/go-logging/actions/workflows/go-test.yaml/badge.svg)](https://github.com/Senzing/go-logging/actions/workflows/go-test.yaml) -[![License](https://img.shields.io/badge/License-Apache2-brightgreen.svg)](https://github.com/Senzing/go-logging/blob/main/LICENSE) +[![Go Reference](https://pkg.go.dev/badge/github.com/senzing-garage/go-logging.svg)](https://pkg.go.dev/github.com/senzing-garage/go-logging) +[![Go Report Card](https://goreportcard.com/badge/github.com/senzing-garage/go-logging)](https://goreportcard.com/report/github.com/senzing-garage/go-logging) +[![License](https://img.shields.io/badge/License-Apache2-brightgreen.svg)](https://github.com/senzing-garage/go-logging/blob/main/LICENSE) + +[![gosec.yaml](https://github.com/senzing-garage/go-logging/actions/workflows/gosec.yaml/badge.svg)](https://github.com/senzing-garage/go-logging/actions/workflows/gosec.yaml) +[![go-test-linux.yaml](https://github.com/senzing-garage/go-logging/actions/workflows/go-test-linux.yaml/badge.svg)](https://github.com/senzing-garage/go-logging/actions/workflows/go-test-linux.yaml) +[![go-test-darwin.yaml](https://github.com/senzing-garage/go-logging/actions/workflows/go-test-darwin.yaml/badge.svg)](https://github.com/senzing-garage/go-logging/actions/workflows/go-test-darwin.yaml) +[![go-test-windows.yaml](https://github.com/senzing-garage/go-logging/actions/workflows/go-test-windows.yaml/badge.svg)](https://github.com/senzing-garage/go-logging/actions/workflows/go-test-windows.yaml) ## Overview @@ -58,7 +74,7 @@ Example: The basic use of senzing/go-logging looks like this: ```go - import "github.com/senzing/go-logging/logging" + import "github.com/senzing-garage/go-logging/logging" logger, _ := logging.New() logger.Log(2001, "Hello world!") @@ -132,25 +148,25 @@ Examples: ### Use with senzing-tools In the suite of -[senzing-tools](https://github.com/Senzing/senzing-tools), +[senzing-tools](https://github.com/senzing-garage/senzing-tools), logging is created by: ```go import ( "fmt" - "github.com/senzing/go-logging/logging" + "github.com/senzing-garage/go-logging/logging" ) var ( - ComponentId = 9999 // See https://github.com/Senzing/knowledge-base/blob/main/lists/senzing-component-ids.md - IdMessages = map[int]string{ // Message templates. Example: https://github.com/Senzing/init-database/blob/main/senzingconfig/main.go + ComponentId = 9999 // See https://github.com/senzing-garage/knowledge-base/blob/main/lists/senzing-component-ids.md + IdMessages = map[int]string{ // Message templates. Example: https://github.com/senzing-garage/init-database/blob/main/senzingconfig/main.go 2000: "Today's greeting: %s", 4000: "Here's what happened: %s", } callerSkip = 3 // Used to determine "location" information. See https://pkg.go.dev/runtime#Caller ) -// Logging options. See https://github.com/Senzing/go-logging/blob/main/logging/main.go +// Logging options. See https://github.com/senzing-garage/go-logging/blob/main/logging/main.go loggerOptions := []interface{}{ &logging.OptionCallerSkip{Value: callerSkip}, } @@ -178,7 +194,7 @@ The error: {"time":"YYYY-MM-DDThh:mm:ss.nnZ","level":"ERROR","id":"senzing-99994 ## References -- [API documentation](https://pkg.go.dev/github.com/senzing/go-logging) +- [API documentation](https://pkg.go.dev/github.com/senzing-garage/go-logging) - [Development](docs/development.md) - [Errors](docs/errors.md) - [Examples](docs/examples.md) diff --git a/doc.go b/doc.go index 344cf57..b80c353 100644 --- a/doc.go +++ b/doc.go @@ -24,7 +24,7 @@ Example: The basic use of senzing/go-logging looks like this: - import "github.com/senzing/go-logging/logging" + import "github.com/senzing-garage/go-logging/logging" logger, _ := logging.New() logger.Log(2000, "A message") @@ -37,7 +37,7 @@ Output: For examples, visit: -- [Examples](https://github.com/Senzing/go-logging/blob/main/docs/examples.md) -- [main.go](https://github.com/Senzing/go-logging/blob/main/main.go) +- [Examples](https://github.com/senzing-garage/go-logging/blob/main/docs/examples.md) +- [main.go](https://github.com/senzing-garage/go-logging/blob/main/main.go) */ package main diff --git a/docs/development.md b/docs/development.md index 2b663fe..8673552 100644 --- a/docs/development.md +++ b/docs/development.md @@ -17,7 +17,7 @@ ``` 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. ## Test diff --git a/docs/examples.md b/docs/examples.md index 41487bb..e5faf75 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -6,7 +6,7 @@ The following examples can be seen in actual code at In each of the following examples, the following import is assumed: ```go -import "github.com/senzing/go-logging/logging" +import "github.com/senzing-garage/go-logging/logging" ``` ## Basic diff --git a/go.mod b/go.mod index 8fe0010..4a93131 100644 --- a/go.mod +++ b/go.mod @@ -1,11 +1,11 @@ -module github.com/senzing/go-logging +module github.com/senzing-garage/go-logging go 1.21 require ( - github.com/senzing/go-messaging v1.3.3 + github.com/senzing-garage/go-messaging v1.4.0 github.com/stretchr/testify v1.8.4 - golang.org/x/exp v0.0.0-20231006140011-7918f672742d + golang.org/x/exp v0.0.0-20231226003508-02704c960a9b ) require ( diff --git a/go.sum b/go.sum index e3c714c..248c571 100644 --- a/go.sum +++ b/go.sum @@ -9,12 +9,12 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/senzing/go-messaging v1.3.3 h1:v3Rff25+ABabP1fXAkiT1rSeFDkhqGOj01ZQrxIEdQo= -github.com/senzing/go-messaging v1.3.3/go.mod h1:61zH2SStja2P9o8mEKpgaUJYerGjWumzIoFQIAZdIag= +github.com/senzing-garage/go-messaging v1.4.0 h1:XNnOsx4yHslhggNJkZD+p3/Fv/zwhbxjCiwTU+nDFXY= +github.com/senzing-garage/go-messaging v1.4.0/go.mod h1:V/B3SZSZY7cw2Nc7rZQkLaJu/PRyDA4AbviccDRjW1I= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -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/exp v0.0.0-20231226003508-02704c960a9b h1:kLiC65FbiHWFAOu+lxwNPujcsl8VYyTYYEZnsOO1WK4= +golang.org/x/exp v0.0.0-20231226003508-02704c960a9b/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/logger/main.go b/logger/main.go index 3af15d4..3afff86 100644 --- a/logger/main.go +++ b/logger/main.go @@ -1,7 +1,7 @@ /* The logger package is a decorator over Go's log package. -For examples of use, see https://github.com/Senzing/go-logging/blob/main/logger/logger_test.go +For examples of use, see https://github.com/senzing-garage/go-logging/blob/main/logger/logger_test.go */ package logger diff --git a/logging/logging.go b/logging/logging.go index 477797b..6ec187e 100644 --- a/logging/logging.go +++ b/logging/logging.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - "github.com/senzing/go-messaging/messenger" + "github.com/senzing-garage/go-messaging/messenger" "golang.org/x/exp/slog" ) diff --git a/logging/logging_test.go b/logging/logging_test.go index 284de90..9dc1d82 100644 --- a/logging/logging_test.go +++ b/logging/logging_test.go @@ -394,7 +394,7 @@ func TestLoggingImpl_NewSenzingSdkLogger(test *testing.T) { // ---------------------------------------------------------------------------- func ExampleNew() { - // For more information, visit https://github.com/Senzing/go-logging/blob/main/logging/logging_test.go + // For more information, visit https://github.com/senzing-garage/go-logging/blob/main/logging/logging_test.go logger, err := New() if err != nil { fmt.Println(err) @@ -404,7 +404,7 @@ func ExampleNew() { } func ExampleNewSenzingToolsLogger() { - // For more information, visit https://github.com/Senzing/go-logging/blob/main/logging/logging_test.go + // For more information, visit https://github.com/senzing-garage/go-logging/blob/main/logging/logging_test.go componentId := 9999 idMessages := map[int]string{ 2001: "My message", @@ -418,7 +418,7 @@ func ExampleNewSenzingToolsLogger() { } func ExampleLoggingImpl_IsTrace() { - // For more information, visit https://github.com/Senzing/go-logging/blob/main/logging/logging_test.go + // For more information, visit https://github.com/senzing-garage/go-logging/blob/main/logging/logging_test.go logger, err := New() if err != nil { fmt.Println(err) @@ -436,7 +436,7 @@ func ExampleLoggingImpl_IsTrace() { } func ExampleLoggingImpl_IsDebug() { - // For more information, visit https://github.com/Senzing/go-logging/blob/main/logging/logging_test.go + // For more information, visit https://github.com/senzing-garage/go-logging/blob/main/logging/logging_test.go logger, err := New() if err != nil { fmt.Println(err) @@ -457,7 +457,7 @@ func ExampleLoggingImpl_IsDebug() { } func ExampleLoggingImpl_IsInfo() { - // For more information, visit https://github.com/Senzing/go-logging/blob/main/logging/logging_test.go + // For more information, visit https://github.com/senzing-garage/go-logging/blob/main/logging/logging_test.go logger, err := New() if err != nil { fmt.Println(err) @@ -478,7 +478,7 @@ func ExampleLoggingImpl_IsInfo() { } func ExampleLoggingImpl_IsWarn() { - // For more information, visit https://github.com/Senzing/go-logging/blob/main/logging/logging_test.go + // For more information, visit https://github.com/senzing-garage/go-logging/blob/main/logging/logging_test.go logger, err := New() if err != nil { fmt.Println(err) @@ -499,7 +499,7 @@ func ExampleLoggingImpl_IsWarn() { } func ExampleLoggingImpl_IsError() { - // For more information, visit https://github.com/Senzing/go-logging/blob/main/logging/logging_test.go + // For more information, visit https://github.com/senzing-garage/go-logging/blob/main/logging/logging_test.go logger, err := New() if err != nil { fmt.Println(err) @@ -520,7 +520,7 @@ func ExampleLoggingImpl_IsError() { } func ExampleLoggingImpl_IsFatal() { - // For more information, visit https://github.com/Senzing/go-logging/blob/main/logging/logging_test.go + // For more information, visit https://github.com/senzing-garage/go-logging/blob/main/logging/logging_test.go logger, err := New() if err != nil { fmt.Println(err) @@ -541,7 +541,7 @@ func ExampleLoggingImpl_IsFatal() { } func ExampleLoggingImpl_IsPanic() { - // For more information, visit https://github.com/Senzing/go-logging/blob/main/logging/logging_test.go + // For more information, visit https://github.com/senzing-garage/go-logging/blob/main/logging/logging_test.go logger, err := New() if err != nil { fmt.Println(err) @@ -558,7 +558,7 @@ func ExampleLoggingImpl_IsPanic() { } func ExampleLoggingImpl_Log_new() { - // For more information, visit https://github.com/Senzing/go-logging/blob/main/logging/logging_test.go + // For more information, visit https://github.com/senzing-garage/go-logging/blob/main/logging/logging_test.go logger, err := New() if err != nil { fmt.Println(err) @@ -568,7 +568,7 @@ func ExampleLoggingImpl_Log_new() { } func ExampleLoggingImpl_Log_newSenzingToolsLogger() { - // For more information, visit https://github.com/Senzing/go-logging/blob/main/logging/logging_test.go + // For more information, visit https://github.com/senzing-garage/go-logging/blob/main/logging/logging_test.go componentId := 9999 idMessages := map[int]string{ 2001: "%s works with %s", diff --git a/logging/main.go b/logging/main.go index 2a40b5c..d2c1f10 100644 --- a/logging/main.go +++ b/logging/main.go @@ -7,8 +7,8 @@ import ( "os" "time" - "github.com/senzing/go-logging/logger" - "github.com/senzing/go-messaging/messenger" + "github.com/senzing-garage/go-logging/logger" + "github.com/senzing-garage/go-messaging/messenger" "golang.org/x/exp/slog" ) @@ -261,7 +261,7 @@ func New(options ...interface{}) (LoggingInterface, error) { // Detect incorrect option values. if componentIdentifier <= 0 || componentIdentifier >= 10000 { - err := errors.New("componentIdentifier must be in range 1..9999. See https://github.com/Senzing/knowledge-base/blob/main/lists/senzing-product-ids.md") + err := errors.New("componentIdentifier must be in range 1..9999. See https://github.com/senzing-garage/knowledge-base/blob/main/lists/senzing-product-ids.md") return result, err } @@ -345,7 +345,7 @@ The NewSenzingSdkLogger function creates a new instance of loggingInterface specifically for use with g2-sdk-go-* packages. Input - - componentId: See list at https://github.com/Senzing/knowledge-base/blob/main/lists/senzing-product-ids.md + - componentId: See list at https://github.com/senzing-garage/knowledge-base/blob/main/lists/senzing-product-ids.md - idMessage: A map of integer to string message templates. - options: Variadic arguments listing the options (usually having type OptionXxxxx) used to configure the logger. @@ -367,7 +367,7 @@ The NewSenzingToolsLogger function creates a new instance of loggingInterface specifically for use with senzing-tools. Input - - componentId: See list at https://github.com/Senzing/knowledge-base/blob/main/lists/senzing-product-ids.md + - componentId: See list at https://github.com/senzing-garage/knowledge-base/blob/main/lists/senzing-product-ids.md - idMessage: A map of integer to string message templates. - options: Variadic arguments listing the options (usually having type OptionXxxxx) used to configure the logger. diff --git a/main.go b/main.go index 2eb6ec4..ea234d7 100644 --- a/main.go +++ b/main.go @@ -8,7 +8,7 @@ import ( "fmt" "strings" - "github.com/senzing/go-logging/logging" + "github.com/senzing-garage/go-logging/logging" ) // ---------------------------------------------------------------------------- @@ -139,8 +139,8 @@ func main() { // ------------------------------------------------------------------------ var ( - ComponentId = 9999 // See https://github.com/Senzing/knowledge-base/blob/main/lists/senzing-component-ids.md - IdMessages = map[int]string{ // Message templates. Example: https://github.com/Senzing/init-database/blob/main/senzingconfig/main.go + ComponentId = 9999 // See https://github.com/senzing-garage/knowledge-base/blob/main/lists/senzing-component-ids.md + IdMessages = map[int]string{ // Message templates. Example: https://github.com/senzing-garage/init-database/blob/main/senzingconfig/main.go 2000: "Today's greeting: %s", 4000: "Here's what happened: %s", } @@ -149,7 +149,7 @@ func main() { printBanner("README.md examples") - // Logging options. See https://github.com/Senzing/go-logging/blob/main/logging/main.go + // Logging options. See https://github.com/senzing-garage/go-logging/blob/main/logging/main.go loggerOptions := []interface{}{ &logging.OptionCallerSkip{Value: callerSkip}, } diff --git a/main_test.go b/main_test.go index 5556ce0..3c5f246 100644 --- a/main_test.go +++ b/main_test.go @@ -3,8 +3,8 @@ package main import ( "testing" - "github.com/senzing/go-logging/logger" - "github.com/senzing/go-logging/logging" + "github.com/senzing-garage/go-logging/logger" + "github.com/senzing-garage/go-logging/logging" ) var ( diff --git a/Makefile.darwin b/makefiles/darwin.mk similarity index 97% rename from Makefile.darwin rename to makefiles/darwin.mk index 061ee3e..4339b45 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 97% rename from Makefile.linux rename to makefiles/linux.mk index 08e409c..3a82acf 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