Add logger & implement fiber error handling
This commit is contained in:
parent
37c0480e0e
commit
6b13bb3fbf
8 changed files with 400 additions and 25 deletions
7
go.mod
7
go.mod
|
|
@ -3,6 +3,7 @@ module git.readonly.ch/bouzoure/pop-camarades
|
|||
go 1.23.4
|
||||
|
||||
require (
|
||||
github.com/charmbracelet/log v0.4.0
|
||||
github.com/flosch/pongo2/v6 v6.0.0
|
||||
github.com/glebarez/sqlite v1.11.0
|
||||
github.com/go-playground/validator/v10 v10.24.0
|
||||
|
|
@ -19,15 +20,18 @@ require (
|
|||
|
||||
require (
|
||||
github.com/andybalholm/brotli v1.1.1 // indirect
|
||||
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
|
||||
github.com/boombuler/barcode v1.0.2 // indirect
|
||||
github.com/cespare/xxhash v1.1.0 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||
github.com/charmbracelet/lipgloss v0.10.0 // indirect
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
||||
github.com/dgraph-io/badger/v3 v3.2103.5 // indirect
|
||||
github.com/dgraph-io/ristretto v0.2.0 // indirect
|
||||
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||
github.com/gabriel-vasile/mimetype v1.4.8 // indirect
|
||||
github.com/glebarez/go-sqlite v1.22.0 // indirect
|
||||
github.com/go-logfmt/logfmt v0.6.0 // indirect
|
||||
github.com/go-playground/locales v0.14.1 // indirect
|
||||
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||
github.com/gofiber/template v1.8.3 // indirect
|
||||
|
|
@ -43,9 +47,12 @@ require (
|
|||
github.com/jinzhu/now v1.1.5 // indirect
|
||||
github.com/klauspost/compress v1.17.11 // indirect
|
||||
github.com/leodido/go-urn v1.4.0 // indirect
|
||||
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
|
||||
github.com/mattn/go-colorable v0.1.14 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.16 // indirect
|
||||
github.com/muesli/reflow v0.3.0 // indirect
|
||||
github.com/muesli/termenv v0.15.2 // indirect
|
||||
github.com/ncruces/go-strftime v0.1.9 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
||||
|
|
|
|||
16
go.sum
16
go.sum
|
|
@ -5,6 +5,8 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE
|
|||
github.com/andybalholm/brotli v1.1.1 h1:PR2pgnyFznKEugtsUo0xLdDop5SKXd5Qf5ysW+7XdTA=
|
||||
github.com/andybalholm/brotli v1.1.1/go.mod h1:05ib4cKhjx3OQYUY22hTVd34Bc8upXjOLL2rKwwZBoA=
|
||||
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
|
||||
github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k=
|
||||
github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8=
|
||||
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
|
||||
github.com/boombuler/barcode v1.0.2 h1:79yrbttoZrLGkL/oOI8hBrUKucwOL0oOjUgEguGMcJ4=
|
||||
github.com/boombuler/barcode v1.0.2/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
|
||||
|
|
@ -14,6 +16,10 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf
|
|||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/charmbracelet/lipgloss v0.10.0 h1:KWeXFSexGcfahHX+54URiZGkBFazf70JNMtwg/AFW3s=
|
||||
github.com/charmbracelet/lipgloss v0.10.0/go.mod h1:Wig9DSfvANsxqkRsqj6x87irdy123SR4dOXlKa91ciE=
|
||||
github.com/charmbracelet/log v0.4.0 h1:G9bQAcx8rWA2T3pWvx7YtPTPwgqpk7D68BX21IRW8ZM=
|
||||
github.com/charmbracelet/log v0.4.0/go.mod h1:63bXt/djrizTec0l11H20t8FDSvA4CRZJ1KH22MdptM=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
|
|
@ -51,6 +57,8 @@ github.com/glebarez/go-sqlite v1.22.0 h1:uAcMJhaA6r3LHMTFgP0SifzgXg46yJkgxqyuyec
|
|||
github.com/glebarez/go-sqlite v1.22.0/go.mod h1:PlBIdHe0+aUEFn+r2/uthrWq4FxbzugL0L8Li6yQJbc=
|
||||
github.com/glebarez/sqlite v1.11.0 h1:wSG0irqzP6VurnMEpFGer5Li19RpIRi2qvQz++w0GMw=
|
||||
github.com/glebarez/sqlite v1.11.0/go.mod h1:h8/o8j5wiAsqSPoWELDUdJXhjAhsVliSn7bWZjOhrgQ=
|
||||
github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4=
|
||||
github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
|
||||
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
|
||||
github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
||||
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
|
||||
|
|
@ -138,15 +146,22 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
|||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=
|
||||
github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=
|
||||
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
|
||||
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
|
||||
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
||||
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
|
||||
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
|
||||
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
||||
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||
github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk=
|
||||
github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
|
||||
github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s=
|
||||
github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8=
|
||||
github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo=
|
||||
github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8=
|
||||
github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4=
|
||||
github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
|
||||
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
||||
|
|
@ -161,6 +176,7 @@ github.com/pquerna/otp v1.4.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1
|
|||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
|
||||
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
|
||||
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
package helpers
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
"git.readonly.ch/bouzoure/pop-camarades/models"
|
||||
"github.com/glebarez/sqlite"
|
||||
"gorm.io/gorm"
|
||||
|
|
@ -16,14 +14,9 @@ func GetDatabase() (*gorm.DB, error) {
|
|||
return database, nil
|
||||
}
|
||||
|
||||
return connectDatabase()
|
||||
}
|
||||
|
||||
func connectDatabase() (*gorm.DB, error) {
|
||||
config, err := GetConfig()
|
||||
if err != nil {
|
||||
// TODO: Handle exception
|
||||
log.Fatal(err)
|
||||
return database, err
|
||||
}
|
||||
|
||||
database, err = gorm.Open(
|
||||
|
|
@ -31,8 +24,7 @@ func connectDatabase() (*gorm.DB, error) {
|
|||
&gorm.Config{},
|
||||
)
|
||||
if err != nil {
|
||||
// TODO: Handle exception
|
||||
log.Fatal(err)
|
||||
return database, err
|
||||
}
|
||||
|
||||
err = database.AutoMigrate(
|
||||
|
|
@ -48,11 +40,9 @@ func connectDatabase() (*gorm.DB, error) {
|
|||
&models.FieldValue{},
|
||||
)
|
||||
if err != nil {
|
||||
// TODO: Handle exception
|
||||
log.Fatal(err)
|
||||
return database, err
|
||||
}
|
||||
|
||||
connected = true
|
||||
|
||||
return database, err
|
||||
return database, nil
|
||||
}
|
||||
|
|
|
|||
55
helpers/error_handler.go
Normal file
55
helpers/error_handler.go
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
package helpers
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/log"
|
||||
)
|
||||
|
||||
func FiberErrorHandler(c *fiber.Ctx, err error) error {
|
||||
// Status code defaults to 500
|
||||
code := fiber.StatusInternalServerError
|
||||
|
||||
// Retrieve the custom status code if it's a *fiber.Error
|
||||
var e *fiber.Error
|
||||
if errors.As(err, &e) {
|
||||
code = e.Code
|
||||
}
|
||||
|
||||
title := fmt.Sprintf("Erreur %d", code)
|
||||
message := err.Error()
|
||||
|
||||
if code == 500 {
|
||||
log := GetLogger()
|
||||
log.Error(
|
||||
err,
|
||||
"url", c.OriginalURL(),
|
||||
"method", c.Method(),
|
||||
"code", code,
|
||||
"ip", c.IP(),
|
||||
)
|
||||
|
||||
message = "Une erreur est survenue, merci de prendre contact avec un administrateur."
|
||||
}
|
||||
|
||||
// Send custom error page
|
||||
err = c.Status(code).Render("error_page", fiber.Map{
|
||||
"PageTitle": title,
|
||||
"Code": code,
|
||||
"Message": message,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
|
||||
return c.Status(
|
||||
fiber.StatusInternalServerError,
|
||||
).SendString(
|
||||
"Internal Server Error",
|
||||
)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
26
helpers/logger.go
Normal file
26
helpers/logger.go
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
package helpers
|
||||
|
||||
import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/charmbracelet/log"
|
||||
)
|
||||
|
||||
var loggerCreated bool
|
||||
var logger *log.Logger
|
||||
|
||||
func GetLogger() *log.Logger {
|
||||
if !loggerCreated {
|
||||
logger = log.NewWithOptions(os.Stderr, log.Options{
|
||||
Level: log.DebugLevel,
|
||||
ReportCaller: true,
|
||||
ReportTimestamp: true,
|
||||
TimeFormat: time.RFC3339,
|
||||
})
|
||||
|
||||
loggerCreated = true
|
||||
}
|
||||
|
||||
return logger
|
||||
}
|
||||
19
main.go
19
main.go
|
|
@ -4,7 +4,6 @@ import (
|
|||
"embed"
|
||||
"fmt"
|
||||
"io/fs"
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"git.readonly.ch/bouzoure/pop-camarades/controllers"
|
||||
|
|
@ -25,28 +24,21 @@ var embedStatic embed.FS
|
|||
var embedViews embed.FS
|
||||
|
||||
func main() {
|
||||
log := helpers.GetLogger()
|
||||
|
||||
config, err := helpers.GetConfig()
|
||||
if err != nil {
|
||||
// TODO: Handle exception
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
_, err = helpers.GetDatabase()
|
||||
if err != nil {
|
||||
// TODO: Handle exception
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
accountCheck, err := helpers.FirstAccountCheck()
|
||||
if err != nil {
|
||||
// TODO: Handle exception
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
if !accountCheck {
|
||||
err = helpers.FirstAccountCreate()
|
||||
if err != nil {
|
||||
// TODO: Handle exception
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
|
@ -72,6 +64,7 @@ func main() {
|
|||
|
||||
app := fiber.New(fiber.Config{
|
||||
Views: engine,
|
||||
ErrorHandler: helpers.FiberErrorHandler,
|
||||
})
|
||||
|
||||
if config.Debug {
|
||||
|
|
@ -205,6 +198,12 @@ func main() {
|
|||
app.Post("/admin/roles/:id<int;min(0)>/edit", controllers.RoleEdit)
|
||||
app.Post("/admin/roles/:id<int;min(0)>/delete", controllers.RoleDelete)
|
||||
|
||||
log.Info(
|
||||
"starting web server",
|
||||
"address", config.App.ListenAddress,
|
||||
"port", config.App.ListenPort,
|
||||
)
|
||||
|
||||
listenAddr := fmt.Sprintf(
|
||||
"%s:%d",
|
||||
config.App.ListenAddress,
|
||||
|
|
|
|||
8
views/error_page.html
Normal file
8
views/error_page.html
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{% extends "layouts/main.html" %}
|
||||
|
||||
{% block main %}
|
||||
<div class="container text-center py-5">
|
||||
<div class="h1 mb-3">Erreur {{ Code }}</div>
|
||||
<code>{{ Message }}</code>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
@ -736,6 +736,47 @@ THE SOFTWARE.
|
|||
</pre>
|
||||
</div>
|
||||
|
||||
<div class="my-5">
|
||||
<span class="h3 my-3">
|
||||
github.com/aymanbagabas/go-osc52/v2
|
||||
</span>
|
||||
<ul class="list-group my-3">
|
||||
<li class="list-group-item">
|
||||
<b>Version:</b> v2.0.1
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>License:</b>
|
||||
|
||||
<a href="https://github.com/aymanbagabas/go-osc52/blob/v2.0.1/LICENSE">
|
||||
MIT
|
||||
</a>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<pre>MIT License
|
||||
|
||||
Copyright (c) 2022 Ayman Bagabas
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div class="my-5">
|
||||
<span class="h3 my-3">
|
||||
github.com/boombuler/barcode
|
||||
|
|
@ -861,6 +902,88 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
</pre>
|
||||
</div>
|
||||
|
||||
<div class="my-5">
|
||||
<span class="h3 my-3">
|
||||
github.com/charmbracelet/lipgloss
|
||||
</span>
|
||||
<ul class="list-group my-3">
|
||||
<li class="list-group-item">
|
||||
<b>Version:</b> v0.10.0
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>License:</b>
|
||||
|
||||
<a href="https://github.com/charmbracelet/lipgloss/blob/v0.10.0/LICENSE">
|
||||
MIT
|
||||
</a>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<pre>MIT License
|
||||
|
||||
Copyright (c) 2021-2023 Charmbracelet, Inc
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div class="my-5">
|
||||
<span class="h3 my-3">
|
||||
github.com/charmbracelet/log
|
||||
</span>
|
||||
<ul class="list-group my-3">
|
||||
<li class="list-group-item">
|
||||
<b>Version:</b> v0.4.0
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>License:</b>
|
||||
|
||||
<a href="https://github.com/charmbracelet/log/blob/v0.4.0/LICENSE">
|
||||
MIT
|
||||
</a>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<pre>MIT License
|
||||
|
||||
Copyright (c) 2022-2023 Charmbracelet, Inc
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div class="my-5">
|
||||
<span class="h3 my-3">
|
||||
github.com/dgraph-io/badger/v3
|
||||
|
|
@ -1543,6 +1666,48 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div class="my-5">
|
||||
<span class="h3 my-3">
|
||||
github.com/go-logfmt/logfmt
|
||||
</span>
|
||||
<ul class="list-group my-3">
|
||||
<li class="list-group-item">
|
||||
<b>Version:</b> v0.6.0
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>License:</b>
|
||||
|
||||
<a href="https://github.com/go-logfmt/logfmt/blob/v0.6.0/LICENSE">
|
||||
MIT
|
||||
</a>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<pre>The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 go-logfmt
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
|
@ -3251,6 +3416,33 @@ SOFTWARE.
|
|||
</pre>
|
||||
</div>
|
||||
|
||||
<div class="my-5">
|
||||
<span class="h3 my-3">
|
||||
github.com/lucasb-eyer/go-colorful
|
||||
</span>
|
||||
<ul class="list-group my-3">
|
||||
<li class="list-group-item">
|
||||
<b>Version:</b> v1.2.0
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>License:</b>
|
||||
|
||||
<a href="https://github.com/lucasb-eyer/go-colorful/blob/v1.2.0/LICENSE">
|
||||
MIT
|
||||
</a>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<pre>Copyright (c) 2013 Lucas Beyer
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div class="my-5">
|
||||
<span class="h3 my-3">
|
||||
github.com/mattn/go-colorable
|
||||
|
|
@ -3352,6 +3544,88 @@ furnished to do so, subject to the following conditions:
|
|||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div class="my-5">
|
||||
<span class="h3 my-3">
|
||||
github.com/muesli/reflow
|
||||
</span>
|
||||
<ul class="list-group my-3">
|
||||
<li class="list-group-item">
|
||||
<b>Version:</b> v0.3.0
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>License:</b>
|
||||
|
||||
<a href="https://github.com/muesli/reflow/blob/v0.3.0/LICENSE">
|
||||
MIT
|
||||
</a>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<pre>MIT License
|
||||
|
||||
Copyright (c) 2019 Christian Muehlhaeuser
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div class="my-5">
|
||||
<span class="h3 my-3">
|
||||
github.com/muesli/termenv
|
||||
</span>
|
||||
<ul class="list-group my-3">
|
||||
<li class="list-group-item">
|
||||
<b>Version:</b> v0.15.2
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<b>License:</b>
|
||||
|
||||
<a href="https://github.com/muesli/termenv/blob/v0.15.2/LICENSE">
|
||||
MIT
|
||||
</a>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<pre>MIT License
|
||||
|
||||
Copyright (c) 2019 Christian Muehlhaeuser
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue