github.com/devstream-io/devstream@v0.13.3/internal/log/symbol.go (about)

     1  package log
     2  
     3  import (
     4  	"fmt"
     5  )
     6  
     7  type Symbol string
     8  
     9  // Symbols struct contains all symbols
    10  type Symbols struct {
    11  	Debug   Symbol
    12  	Info    Symbol
    13  	Warning Symbol
    14  	Warn    Symbol
    15  	Error   Symbol
    16  	Fatal   Symbol
    17  	Success Symbol
    18  }
    19  
    20  var normal = Symbols{
    21  	Debug:   Symbol("λ"),
    22  	Info:    Symbol("ℹ"),
    23  	Success: Symbol("✔"),
    24  	Warning: Symbol("⚠"),
    25  	Warn:    Symbol("⚠"),
    26  	Error:   Symbol("!!"),
    27  	Fatal:   Symbol("✖"),
    28  }
    29  
    30  // String returns a printable representation of Symbols struct
    31  func (s Symbols) String() string {
    32  	return fmt.Sprintf("Debug: %s Info: %s Success: %s Warning: %s Error: %s Fatal: %s", s.Debug, s.Info, s.Success, s.Warning, s.Error, s.Fatal)
    33  }