You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TODO! Check methods using value and point receivers for the same function
11
+
10
12
typeErrLoggerNotFoundstruct {
11
13
Name abstraction.LoggerName
12
14
}
13
15
14
16
func (errErrLoggerNotFound) Error() string {
15
-
returnfmt.Sprintf("Logger %s not found", err.Name)
17
+
returnfmt.Sprintf("Error %s logger not found", err.Name)
16
18
}
17
19
18
20
typeErrCreatingFilestruct {
@@ -21,7 +23,7 @@ type ErrCreatingFile struct {
21
23
Innererror
22
24
}
23
25
24
-
func (err*ErrCreatingFile) Error() string {
26
+
func (errErrCreatingFile) Error() string {
25
27
returnfmt.Sprintf("Error creating file for %s logger at %s", err.Name, err.Timestamp.Format(time.RFC3339))
26
28
}
27
29
@@ -34,8 +36,8 @@ type ErrLoggerNotRunning struct {
34
36
Timestamp time.Time
35
37
}
36
38
37
-
func (err*ErrLoggerNotRunning) Error() string {
38
-
returnfmt.Sprintf("Logger %s not running at %s", err.Name, err.Timestamp.Format(time.RFC3339))
39
+
func (errErrLoggerNotRunning) Error() string {
40
+
returnfmt.Sprintf("Error %s logger not running at %s", err.Name, err.Timestamp.Format(time.RFC3339))
39
41
}
40
42
41
43
typeErrWrongRecordTypestruct {
@@ -45,14 +47,67 @@ type ErrWrongRecordType struct {
45
47
Received abstraction.LoggerRecord
46
48
}
47
49
48
-
func (err*ErrWrongRecordType) Error() string {
49
-
returnfmt.Sprintf("Wrong record type for logger %s at %s, expected %T, got %T", err.Name, err.Timestamp.Format(time.RFC3339), err.Expected.Name(), err.Received.Name())
50
+
func (errErrWrongRecordType) Error() string {
51
+
returnfmt.Sprintf("Error wrong record type for %s logger at %s, expected %T, got %T", err.Name, err.Timestamp.Format(time.RFC3339), err.Expected.Name(), err.Received.Name())
50
52
}
51
53
52
-
typeErrParsingLoggerMapstruct {
53
-
Name abstraction.LoggerName
54
+
typeErrStartingLoggerstruct {
55
+
Name abstraction.LoggerName
56
+
Timestamp time.Time
57
+
}
58
+
59
+
func (errErrStartingLogger) Error() string {
60
+
returnfmt.Sprintf("Error starting %s logger at %s", err.Name, err.Timestamp.Format(time.RFC3339))
61
+
}
62
+
63
+
typeErrStoppingLoggerstruct {
64
+
Name abstraction.LoggerName
65
+
Timestamp time.Time
66
+
}
67
+
68
+
func (errErrStoppingLogger) Error() string {
69
+
returnfmt.Sprintf("Error stopping %s logger at %s", err.Name, err.Timestamp.Format(time.RFC3339))
70
+
}
71
+
72
+
typeErrPushingRecordstruct {
73
+
Name abstraction.LoggerName
74
+
Timestamp time.Time
75
+
Innererror
76
+
}
77
+
78
+
func (errErrPushingRecord) Error() string {
79
+
returnfmt.Sprintf("Error pushing reord in %s logger at %s", err.Name, err.Timestamp.Format(time.RFC3339))
0 commit comments