mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-26 21:50:44 -06:00
Compare commits
2 commits
4230aa175a
...
8442447bfd
Author | SHA1 | Date | |
---|---|---|---|
8442447bfd | |||
53efc5e18c |
3 changed files with 13 additions and 4 deletions
|
@ -57,7 +57,7 @@ in
|
||||||
# oizys-zig = pkgs.callPackage ../pkgs/oizys/oizys-zig { inherit zig2nix; };
|
# oizys-zig = pkgs.callPackage ../pkgs/oizys/oizys-zig { inherit zig2nix; };
|
||||||
# oizys-nim = pkgs.callPackage ../pkgs/oizys/oizys-nim { };
|
# oizys-nim = pkgs.callPackage ../pkgs/oizys/oizys-nim { };
|
||||||
# oizys-rs = pkgs.callPackage ../pkgs/oizys/oizys-rs { };
|
# oizys-rs = pkgs.callPackage ../pkgs/oizys/oizys-rs { };
|
||||||
oizys-go = pkgs.callPackage ../pkgs/oizys/oizys-go { inherit self lib; };
|
oizys-go = pkgs.callPackage ../pkgs/oizys/oizys-go { inherit self; };
|
||||||
default = oizys-go;
|
default = oizys-go;
|
||||||
});
|
});
|
||||||
devShells = forAllSystems (pkgs: {
|
devShells = forAllSystems (pkgs: {
|
||||||
|
|
|
@ -6,6 +6,7 @@ import (
|
||||||
o "oizys/internal/oizys"
|
o "oizys/internal/oizys"
|
||||||
|
|
||||||
"github.com/charmbracelet/log"
|
"github.com/charmbracelet/log"
|
||||||
|
"github.com/charmbracelet/lipgloss"
|
||||||
cc "github.com/ivanpirog/coloredcobra"
|
cc "github.com/ivanpirog/coloredcobra"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
@ -54,8 +55,15 @@ var rootCmd = &cobra.Command{
|
||||||
func setupLogger() {
|
func setupLogger() {
|
||||||
log.SetReportTimestamp(false)
|
log.SetReportTimestamp(false)
|
||||||
styles := log.DefaultStyles()
|
styles := log.DefaultStyles()
|
||||||
for k, v := range styles.Levels {
|
colors := map[log.Level]string{
|
||||||
styles.Levels[k] = v.Width(5).MaxWidth(5)
|
log.DebugLevel: "8",
|
||||||
|
log.InfoLevel: "6",
|
||||||
|
log.WarnLevel: "3",
|
||||||
|
log.ErrorLevel: "1",
|
||||||
|
log.FatalLevel: "1",
|
||||||
|
}
|
||||||
|
for k, v := range colors {
|
||||||
|
styles.Levels[k] = styles.Levels[k].MaxWidth(5).Width(5).Foreground(lipgloss.Color(v))
|
||||||
}
|
}
|
||||||
log.SetStyles(styles)
|
log.SetStyles(styles)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
self,
|
||||||
lib,
|
lib,
|
||||||
installShellFiles,
|
installShellFiles,
|
||||||
buildGoModule,
|
buildGoModule,
|
||||||
|
@ -12,7 +13,7 @@ let
|
||||||
in
|
in
|
||||||
buildGoModule {
|
buildGoModule {
|
||||||
pname = "oizys";
|
pname = "oizys";
|
||||||
version = "unstable";
|
version = "${self.shortRev or "dirty"}";
|
||||||
|
|
||||||
src = cleanSource ./.;
|
src = cleanSource ./.;
|
||||||
vendorHash = "sha256-/JVXhXrU2np/ty7AGFy+LPZCo1NaLYl9NAyD9+FJYBI=";
|
vendorHash = "sha256-/JVXhXrU2np/ty7AGFy+LPZCo1NaLYl9NAyD9+FJYBI=";
|
||||||
|
|
Loading…
Reference in a new issue