Library to show log lines at the start of a program
==================================================
==================================================
==================== gosplash ====================
==================================================
================ Made with ❤️ by =================
============ https://github.com/qdm12 ============
==================================================
==================================================
Running version v1.1.1 built on 2021-07-14 (commit c892ef2)
📣 hello world
🔧 Need help? https://github.com/qdm12/gosplash/discussions/new
🐛 Bug? https://github.com/qdm12/gosplash/issues/new
✨ New feature? https://github.com/qdm12/gosplash/issues/new
☕ Discussion? https://github.com/qdm12/gosplash/discussions/new
💻 Email? quentin.mcgaw@gmail.com
💰 Help me? https://www.paypal.me/qmcgaw https://github.com/sponsors/qdm12
-
Tailored towards Github repositories for now, create an issue if you need something
-
Wide range of optional settings available:
type Settings struct { // Formatting settings Format Format // defaults to DefaultFormat LineLength int // defaults to 40 Separator rune // defaults to '=' MadeByPrefix string // defaults to "Made with ❤️ by " // Project information RootURL string // defaults to https://github.com User string Repository string Authors []string // defaults to [RootURL + "/" + User] Emails []string // Program information Version string // defaults to "unknown" Commit string // defaults to "unknown" BuildDate string // defaults to "unknown date" Announcement string AnnounceExp time.Time // leave to zero value to disable expiration // Sponsor information PaypalUser string GithubSponsor string }
-
Support for emojis
-
100% test coverage
go get github.com/qdm12/gosplash
From the example:
package main
import (
"fmt"
"strings"
"github.com/qdm12/gosplash"
)
var (
// should be set by your CI using -ldflags
version = "v0.1.0"
commit = "c892ef2"
buildDate = "2021-07-14"
)
func main() {
lines := gosplash.MakeLines(gosplash.Settings{
User: "qdm12",
Repository: "gosplash",
Version: version,
Commit: commit,
BuildDate: buildDate,
Announcement: "new feature 🎉",
PaypalUser: "qmcgaw",
GithubSponsor: "qdm12",
})
fmt.Println(strings.Join(lines, "\n"))
}
- Problem or suggestion?
- Happy?
- Sponsor me on github.com/sponsors/qdm12
- Donate to paypal.me/qmcgaw
- Drop me an email
- nodesplash: a TypeScript / Node.js port by codetheweb