Skip to content

Commit 20f826e

Browse files
committed
fix some golint warnings
1 parent 73d080b commit 20f826e

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

common.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,34 @@ var (
66
// When handling is required, it is best to use custom error types with both standard and custom traits.
77
CommonErrors = NewNamespace("common")
88

9+
// IllegalArgument is a type for invalid argument error
910
IllegalArgument = CommonErrors.NewType("illegal_argument")
11+
// IllegalState is a type for invalid state error
1012
IllegalState = CommonErrors.NewType("illegal_state")
13+
// IllegalFormat is a type for invalid format error
1114
IllegalFormat = CommonErrors.NewType("illegal_format")
15+
// InitializationFailed is a type for initialization error
1216
InitializationFailed = CommonErrors.NewType("initialization_failed")
17+
// DataUnavailable is a type for unavailable data error
1318
DataUnavailable = CommonErrors.NewType("data_unavailable")
19+
// UnsupportedOperation is a type for unsupported operation error
1420
UnsupportedOperation = CommonErrors.NewType("unsupported_operation")
21+
// RejectedOperation is a type for rejected operation error
1522
RejectedOperation = CommonErrors.NewType("rejected_operation")
23+
// Interrupted is a type for interruption error
1624
Interrupted = CommonErrors.NewType("interrupted")
25+
// AssertionFailed is a type for assertion error
1726
AssertionFailed = CommonErrors.NewType("assertion_failed")
27+
// InternalError is a type for internal error
1828
InternalError = CommonErrors.NewType("internal_error")
29+
// ExternalError is a type for external error
1930
ExternalError = CommonErrors.NewType("external_error")
31+
// ConcurrentUpdate is a type for concurrent update error
2032
ConcurrentUpdate = CommonErrors.NewType("concurrent_update")
33+
// TimeoutElapsed is a type for timeout error
2134
TimeoutElapsed = CommonErrors.NewType("timeout", Timeout())
35+
// NotImplemented is an error type for lacking implementation
2236
NotImplemented = UnsupportedOperation.NewSubtype("not_implemented")
37+
// UnsupportedVersion is a type for unsupported type error
2338
UnsupportedVersion = UnsupportedOperation.NewSubtype("version")
2439
)

type.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ func (t *Type) String() string {
115115
return t.FullName()
116116
}
117117

118+
// MarshalText implements encoding.TextMarshaler
118119
func (t *Type) MarshalText() (text []byte, err error) {
119120
return []byte(t.String()), nil
120121
}

0 commit comments

Comments
 (0)