mirror of
https://github.com/mariocandela/beelzebub.git
synced 2025-07-01 18:47:26 -04:00
Refactoring enum with value
This commit is contained in:
@ -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 (
|
||||
|
Reference in New Issue
Block a user