This commit is contained in:
parent
dfb718b473
commit
9e730f3a5d
48
.gitea/workflows/ci-basic.yml
Normal file
48
.gitea/workflows/ci-basic.yml
Normal file
@ -0,0 +1,48 @@
|
||||
name: Go CI/CD
|
||||
run-name: ${{ github.actor }} is running CI/CD basic
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- main
|
||||
- release/**
|
||||
- develop
|
||||
pull_request:
|
||||
branches-ignore:
|
||||
- main
|
||||
- release/**
|
||||
- develop
|
||||
|
||||
jobs:
|
||||
go-ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.24'
|
||||
|
||||
- name: Download dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
go mod tidy -x
|
||||
|
||||
- name: Run tests
|
||||
shell: bash
|
||||
run: |
|
||||
go test -json > test-report.out
|
||||
go test -coverprofile=coverage.out
|
||||
|
||||
- name: SonarQube Analysis
|
||||
uses: SonarSource/sonarqube-scan-action@v5
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }}
|
||||
|
||||
- name: Build binary
|
||||
shell: bash
|
||||
run: |
|
||||
go build -o ./bin/app main.go
|
48
.gitea/workflows/ci-protected.yml
Normal file
48
.gitea/workflows/ci-protected.yml
Normal file
@ -0,0 +1,48 @@
|
||||
name: Go CI/CD
|
||||
run-name: ${{ github.actor }} is running CI/CD protected
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- release/**
|
||||
- develop
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- release/**
|
||||
- develop
|
||||
|
||||
jobs:
|
||||
go-ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.24'
|
||||
|
||||
- name: Download dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
go mod tidy -x
|
||||
|
||||
- name: Run tests
|
||||
shell: bash
|
||||
run: |
|
||||
go test -json > test-report.out
|
||||
go test -coverprofile=coverage.out
|
||||
|
||||
- name: SonarQube Analysis
|
||||
uses: SonarSource/sonarqube-scan-action@v5
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }}
|
||||
|
||||
- name: Build binary
|
||||
shell: bash
|
||||
run: |
|
||||
go build -o ./bin/app main.go
|
41
.gitea/workflows/ci-tag.yml
Normal file
41
.gitea/workflows/ci-tag.yml
Normal file
@ -0,0 +1,41 @@
|
||||
name: Go CI/CD
|
||||
run-name: ${{ github.actor }} is running CI/CD Tag
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
go-ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.24'
|
||||
|
||||
- name: Download dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
go mod tidy -x
|
||||
|
||||
- name: Run tests
|
||||
shell: bash
|
||||
run: |
|
||||
go test -json > test-report.out
|
||||
go test -coverprofile=coverage.out
|
||||
|
||||
- name: SonarQube Analysis
|
||||
uses: SonarSource/sonarqube-scan-action@v5
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }}
|
||||
|
||||
- name: Build binary
|
||||
shell: bash
|
||||
run: |
|
||||
go build -o ./bin/app main.go
|
64
.gitignore
vendored
Normal file
64
.gitignore
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
# Binaries for programs and plugins
|
||||
bin
|
||||
*.exe
|
||||
*.dll
|
||||
*.so
|
||||
*.dylib
|
||||
*.test
|
||||
|
||||
# Output of the 'go tool cover' command
|
||||
*.out
|
||||
coverage.xml
|
||||
test-report.xml
|
||||
|
||||
# Directory for Go modules
|
||||
/vendor/
|
||||
|
||||
# Go workspace file
|
||||
go.work
|
||||
go.work.sum
|
||||
|
||||
# Editor configs
|
||||
*.swp
|
||||
*.swo
|
||||
*.bak
|
||||
*.tmp
|
||||
*.log
|
||||
*.viminfo
|
||||
*.un~
|
||||
Session.vim
|
||||
|
||||
# JetBrains Rider specific
|
||||
.idea/
|
||||
*.iml
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
.idea/**/shelf/
|
||||
|
||||
# Sublime Text specific
|
||||
*.sublime-workspace
|
||||
*.sublime-project
|
||||
|
||||
# VSCode specific
|
||||
.vscode/
|
||||
.vscode/settings.json
|
||||
.vscode/tasks.json
|
||||
.vscode/launch.json
|
||||
|
||||
# Emacs specific
|
||||
*~
|
||||
\#*\#
|
||||
.#*
|
||||
|
||||
# MacOS specific
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Node modules (in case of tools/scripts)
|
||||
node_modules/
|
||||
|
||||
# Python virtual environments (for dev tools/scripts)
|
||||
venv/
|
||||
*.pyc
|
||||
__pycache__/
|
29
README.md
29
README.md
@ -1,3 +1,28 @@
|
||||
# stonelog
|
||||
# 🔥 Stonelog - 10 Billion Times Better Logging!
|
||||
|
||||
Stonelog: 10 billion times more epic scientific logging! 🔬💥 Dr.Stone-style quotes, dramatic errors & badass successes. For the glory of the Kingdom of Science!
|
||||
The most scientifically badass logging library from the Kingdom of Science!
|
||||
|
||||
[]()
|
||||
[]()
|
||||
[]()
|
||||
|
||||
## 🚀 Why Stonelog?
|
||||
|
||||
- Dr.Stone-themed logging that Senku would approve
|
||||
- Dramatic error messages worthy of a lab explosion
|
||||
- Character quotes from your favorite scientists
|
||||
- 10 billion watts of scientific swagger
|
||||
|
||||
## 💥 Installation
|
||||
|
||||
```bash
|
||||
go get gitstormr.dev/stone-utils/stonelog@latest
|
||||
```
|
||||
|
||||
**Join the Scientific Revolution!**
|
||||
|
||||
> "This isn't just logging - it's 10 billion percent scientific progress!" - Senku Ishigami
|
||||
|
||||
Kingdom of Science Approved
|
||||
|
||||
(Now with 100% more Chrome screaming "SO BADASS!")
|
50
prefixes.go
Normal file
50
prefixes.go
Normal file
@ -0,0 +1,50 @@
|
||||
package stonelog
|
||||
|
||||
var (
|
||||
stoneTracePrefixes = []string{
|
||||
"Science traces",
|
||||
"Lab sensors detect",
|
||||
"Microscope focus on",
|
||||
"Quantum scanner active:",
|
||||
"Data particles observed:",
|
||||
}
|
||||
|
||||
stoneDebugPrefixes = []string{
|
||||
"Hypothesis forming:",
|
||||
"Analyzing data patterns:",
|
||||
"Debugging quantum fluctuations:",
|
||||
"Lab notes:",
|
||||
"Testing variables:",
|
||||
}
|
||||
|
||||
stoneInfoPrefixes = []string{
|
||||
"Experiment successful:",
|
||||
"Lab results:",
|
||||
"Scientific consensus:",
|
||||
"Discovery logged:",
|
||||
"Theory proven:",
|
||||
}
|
||||
|
||||
stoneWarnPrefixes = []string{
|
||||
"Anomaly detected:",
|
||||
"Risk probability increased:",
|
||||
"System instability suspected:",
|
||||
"Contamination warning:",
|
||||
"Resource depletion imminent:",
|
||||
}
|
||||
|
||||
stoneErrorPrefixes = []string{
|
||||
"Critical malfunction:",
|
||||
"Lab accident reported:",
|
||||
"Data corruption confirmed:",
|
||||
"System collapse:",
|
||||
"Hypothesis disproven:",
|
||||
}
|
||||
|
||||
stonePanicPrefixes = []string{
|
||||
"¡¡¡CATASTROPHIC FAILURE!!!",
|
||||
"Emergency protocol FAILED:",
|
||||
"LEAVE THE LAB!",
|
||||
"¡¡¡IMMINENT NUCLEAR FUSION!!!",
|
||||
}
|
||||
)
|
7
sonar-project.properties
Normal file
7
sonar-project.properties
Normal file
@ -0,0 +1,7 @@
|
||||
sonar.projectKey=b97a45b2-c25d-4fd1-898d-136414896ce6
|
||||
sonar.projectName=mother-utils/motherlog
|
||||
sonar.language=go
|
||||
sonar.sources=.
|
||||
sonar.exclusions=**/*_test.go
|
||||
sonar.tests=.
|
||||
sonar.test.inclusions=**/*_test.go
|
Loading…
x
Reference in New Issue
Block a user