Skip to content

Commit a7f1734

Browse files
committed
Initial commit - go-logger v1.0.0
A simple, flexible logging library for Go with structured logging support.
0 parents  commit a7f1734

14 files changed

Lines changed: 2877 additions & 0 deletions

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Go
17+
uses: actions/setup-go@v5
18+
with:
19+
go-version: '1.22.x'
20+
21+
- name: Verify build
22+
run: go build ./...
23+
24+
- name: Vet
25+
run: go vet ./...
26+
27+
- name: Test
28+
run: go test ./...

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Miguel Mariz
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+

Makefile

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
.PHONY: test fmt vet all clean help test-concurrency test-progress
2+
3+
# Default target
4+
all: fmt vet test
5+
6+
# Run all tests
7+
test:
8+
@echo "Running tests..."
9+
@go test -v ./...
10+
11+
# Run concurrency tests with real-time progress display
12+
test-concurrency:
13+
@echo "Running concurrency test with real-time progress..."
14+
@echo "Watch the mutex prevent garbled output from 100+ concurrent goroutines!"
15+
@echo ""
16+
@go test -v -run TestConcurrency_RealTimeProgress ./logger
17+
18+
# Run only concurrency tests (without real-time display)
19+
test-concurrency-all:
20+
@echo "Running all concurrency tests..."
21+
@go test -v -run TestConcurrency ./logger
22+
23+
# Format code
24+
fmt:
25+
@echo "Formatting code..."
26+
@go fmt ./...
27+
28+
# Run static analysis
29+
vet:
30+
@echo "Running go vet..."
31+
@go vet ./...
32+
33+
# Clean build artifacts and cache
34+
clean:
35+
@echo "Cleaning..."
36+
@go clean -cache -testcache
37+
38+
# Pre-release check: format, vet, and test
39+
pre-release: fmt vet test
40+
@echo "✓ All pre-release checks passed!"
41+
@echo "Ready to create release tag"
42+
43+
# Help target
44+
help:
45+
@echo "Available targets:"
46+
@echo " make test - Run all tests"
47+
@echo " make test-concurrency - Demo real-time concurrent logging (100 goroutines)"
48+
@echo " make fmt - Format code"
49+
@echo " make vet - Run static analysis"
50+
@echo " make all - Run fmt, vet, and test (default)"
51+
@echo " make pre-release - Run all checks before release"
52+
@echo " make clean - Clean build cache"
53+
@echo " make help - Show this help message"

0 commit comments

Comments
 (0)