util

package
v0.0.0-...-51e79af Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func File_exists

func File_exists(path string) bool

func File_list

func File_list(path string, pattern string) []string

func File_read_text

func File_read_text(file_name string) ([]string, error)

func Setup_logger

func Setup_logger(log_level string, log_type string) *slog.Logger

Types

type Log_file_parser

type Log_file_parser struct {
	Line_input              func() (string, error)
	Re_start                *regexp.Regexp
	Max_n_messages          uint64
	N_messages              uint64
	Max_n_lines             uint
	Internal_status         string
	Internal_status_message string
	// contains filtered or unexported fields
}

func (*Log_file_parser) Next

func (log_file_parser *Log_file_parser) Next() (string, error)

func (*Log_file_parser) Parse

func (log_file_parser *Log_file_parser) Parse()

func (*Log_file_parser) Status

func (log_file_parser *Log_file_parser) Status() (string, error)

type Log_message

type Log_message struct {
	Log_level string
	Message   string
}

type Loggo_serve_info

type Loggo_serve_info struct {
	Whoami    string
	Version   string
	Timestamp string
	Routes    []string
}

type Msg_log

type Msg_log struct {
	Status string
	Msg    string
}

todo: actually use this in serve and connect

type TimePattern

type TimePattern string

func (TimePattern) FormatTimeAsStringFunc

func (t TimePattern) FormatTimeAsStringFunc() func(time.Time) string

func (TimePattern) GolangTimeLayout

func (t TimePattern) GolangTimeLayout() string

func (TimePattern) String

func (t TimePattern) String() string

func (TimePattern) ToRegex

func (t TimePattern) ToRegex() regexp.Regexp

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL