initial commit
Some checks failed
Go CI/CD / go-ci (push) Has been cancelled

This commit is contained in:
Rene Nochebuena 2025-04-09 02:39:25 -06:00
parent dfb718b473
commit 9e730f3a5d
Signed by: Rene Nochebuena
GPG Key ID: A9FD83117EA538D8
8 changed files with 288 additions and 2 deletions

View 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

View 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

View 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
View 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__/

View File

@ -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!
[![Kingdom of Science Approved](https://img.shields.io/badge/Approved%20By-Kingdom%20of%20Science-blueviolet)]()
[![SO BADASS](https://img.shields.io/badge/Science-SO_BADASS!-blueviolet)]()
[![10 BILLION](https://img.shields.io/badge/10_Billion%25-Scientific-blueviolet)]()
## 🚀 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!")

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module gitstormr.dev/stone-utils/stonelog
go 1.24

50
prefixes.go Normal file
View 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
View 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