Skip to content

Commit

Permalink
Rename log scanner
Browse files Browse the repository at this point in the history
  • Loading branch information
geerew committed Nov 22, 2024
1 parent 52a84e9 commit fe6bc59
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions utils/types/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type LogType int
const (
LogTypeRequest LogType = iota
LogTypeCron
LogTypeCourseScanner
LogTypeScanner
LogTypeFileSystem
LogTypeDB
)
Expand All @@ -23,7 +23,7 @@ func AllLogTypes() []string {
return []string{
LogTypeRequest.String(),
LogTypeCron.String(),
LogTypeCourseScanner.String(),
LogTypeScanner.String(),
LogTypeFileSystem.String(),
LogTypeDB.String(),
}
Expand All @@ -33,7 +33,7 @@ func AllLogTypes() []string {

// String returns the string representation of the LogType
func (lt LogType) String() string {
names := [...]string{"request", "cron", "course scanner", "file system", "db"}
names := [...]string{"request", "cron", "scanner", "file system", "db"}

if int(lt) < 0 || int(lt) >= len(names) {
return "unknown"
Expand Down
6 changes: 3 additions & 3 deletions utils/types/log_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestLog_String(t *testing.T) {
}{
{LogTypeRequest, "request"},
{LogTypeCron, "cron"},
{LogTypeCourseScanner, "course scanner"},
{LogTypeScanner, "scanner"},
{LogTypeFileSystem, "file system"},
{LogTypeDB, "db"},
{LogType(999), "unknown"},
Expand All @@ -32,7 +32,7 @@ func TestLog_String(t *testing.T) {
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

func TestLog_AllLogTypes(t *testing.T) {
expected := []string{"request", "cron", "course scanner", "file system", "db"}
expected := []string{"request", "cron", "scanner", "file system", "db"}
require.Equal(t, expected, AllLogTypes())
}

Expand All @@ -45,7 +45,7 @@ func TestLog_LogValue(t *testing.T) {
}{
{LogTypeRequest, "request"},
{LogTypeCron, "cron"},
{LogTypeCourseScanner, "course scanner"},
{LogTypeScanner, "scanner"},
{LogTypeFileSystem, "file system"},
{LogTypeDB, "db"},
}
Expand Down

0 comments on commit fe6bc59

Please sign in to comment.