Skip to content

Tags: l50/goutils

Tags

v2.2.7

Toggle v2.2.7's commit message
Fixed goreleaser action

v2.2.6

Toggle v2.2.6's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Enhanced Kubernetes dynamic execution and client operations

**Added:**
- Added ExecutorCreator interface to abstract SPDYExecutor creation.
- Introduced DefaultExecutorCreator with NewSPDYExecutor method.
- Implemented detailed documentation for new ExecutorCreator in README.md.
- Added comprehensive tests for new execution structure in execution_test.go.
- Added `KubernetesClientInterface` to define the interface for `KubernetesClient`.
- Introduced `RealKubernetesClient` as an implementation of `KubernetesClientInterface`.
- Added extensive inline documentation to the methods of `RealKubernetesClient`.
- Updated unit tests in `client_test.go` to use mock implementations of the new interface.

**Changed:**
- Updated ExecKubernetesResources to utilize ExecutorCreator.
- Modified README.md to reflect new parameters and structure in execution method.
- Enhanced execution.go with new interface and improved command execution logic.
- Refactored `NewKubernetesClient` function to accept `KubernetesClientInterface`.
- Updated function calls in existing code to use the new interface methods.
- Enhanced error checking and added validation for `ExecKubernetesResources` function.
- Fixed potential nil pointer dereferences in `deploymentLogger.go` and
  `serviceLogger.go` by adding checks before accessing objects.
- Update go mods
- Replaced return of *kubernetes.Clientset with interface

**Removed:**
- Removed outdated blackfriday v1.6.0 entries from go.sum to clean up dependencies.
- Failing test that doesn't crash

v2.2.5

Toggle v2.2.5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fixed badges in README.md

v2.2.4

Toggle v2.2.4's commit message
Updated all actions to go1.22

v2.2.3

Toggle v2.2.3's commit message
Added DetermineLogLevel function and tests for logging

**Added:**

- `DetermineLogLevel` function in `loginfo.go` to determine the log level
  from a given string.
- Test cases for `DetermineLogLevel` function in `loginfo_test.go` using
  table-driven tests.

**Changed:**

- Bumped go version to `1.22` in `go.mod` and `go.sum` files.

v2.2.2

Toggle v2.2.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Update go.sum (#551)

* Update go.sum

* Incorporate update from renovate PR

v2.2.1

Toggle v2.2.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Enhance Logging and Pre-Commit Hooks (#545)

Implemented Close Method for Loggers and Enhanced Logging System

**Added:**
- `Close` method in ColorLogger and PlainLogger for effective log file handling.
- Logger interface extended with `Close` method.
- Examples and tests updated to include `Close` method.

**Changed:**
- Adjusted `ConfigureLogger` to align with new `Close` method.
- Minor readability enhancement in `logutils.go`.
- Refactored `ColorLogger` to use static color settings.
- Improved PrettyHandler tests for no color codes in output.
- Updated test messages to include ANSI color codes.
- Refined output validation in PrettyHandler tests.
- Enhanced `run-go-tests.sh` and `go-vet.sh` scripts for performance.
- Moved `CreateLogFile()` and `ConfigureLogger()` to `LogConfig` struct.
- Updated `README.md` and code comments for new logging structure.
- Modified ColorLogger methods for direct slog.Record use.
- Simplified log message construction in loggers.
- Enhanced JSON log parsing in `PrettyHandler`.
- Optimized `ColorLogger` methods for performance.
- Updated `NewPrettyHandler` for structured formatting and colorization.
- Refined `Handle` method in `PrettyHandler` for improved log processing.
- Added `outputToFile`, `outputJSON`, and `outputFormatted` methods in `PrettyHandler`.
- Introduced `parseLogRecord` and `colorizeBasedOnLevel` methods in `PrettyHandler`.

**Removed:**
- Redundant `Close()` method from loggers.
- Obsolete code and comments from PrettyHandler.
- Unused imports for streamlined code.

**Fixed:**
- Color codes issue in JSON output and random {} in color output.
- Corrected test assertion logic in PrettyHandler tests.
- Resolved SC2207 ShellCheck warnings.
- Addressed go vet and test script issues in CI.
- Fixed markdown formatting in `README.md`.

**Performance Improvements:**
- Increased pre-commit run speed and script robustness.

v2.2.0

Toggle v2.2.0's commit message
chore(deps): update github/codeql-action digest to 012739e

v2.1.9

Toggle v2.1.9's commit message
Added some sanity to renovatebot's schedule

v2.1.8

Toggle v2.1.8's commit message
Fixed that pesky meta-labeler issue