Refactoring enum with value

This commit is contained in:
Mario
2022-05-17 23:32:00 +02:00
parent 50705243f4
commit d93e097c70
4 changed files with 27 additions and 10 deletions

View File

@ -22,9 +22,9 @@ func (tracer *Tracer) TraceEvent(event Event) {
type Event struct {
RemoteAddr string
Protocol Protocol
Protocol string
Command string
Status Status
Status string
Msg string
ID string
Environ string
@ -47,6 +47,10 @@ const (
SSH
)
func (status Protocol) String() string {
return [...]string{"HTTP", "SSH"}[status]
}
type Status int
const (