| Age | Commit message (Collapse) | Author |
|
With help of spdxconv tool [1], we able to bulk update all files license
and copyright format to comply with SPDX formats.
[1] https://kilabit.info/project/spdxconv/
|
|
HTTP request now implicitly create request with context.
Any false positive related to not closing HTTP response body has been
annotated with "nolint:bodyclose".
In the example code, use consistent "// Output:" comment format, by
prefixing with single space.
Any comment on code now also prefixing with single space.
An error returned without variables now use [errors.New] instead of
[fmt.Errorf].
Any error returned using [fmt.Errorf] now wrapped using "%w" instead of
"%s".
Also, replace error checking using [errors.Is] or [errors.As], instead
of using equal/not-equal operator.
Any statement like "x = x OP y" now replaced with "x OP= y".
Also, swap statement is simplified using "x, y = y, x".
Any switch statement with single case now replaced with if-condition.
Any call to defer on function or program that call [os.Exit], now
replaced by calling the deferred function directly.
Any if-else condition now replaced with switch statement, if possible.
|
|
The original idea of providing Now is to mock the current time in
testing Scheduler.
Since this variable can be overridden by other packages, it is not safe
to export it, hence we un-export it here so it can be used internal only.
|
|
Both of those methods has been added into standard library as
[Time.UnixMicro] and [Time.UnixMilli] since Go 1.17.
|
|
While at it, realign struct in TestScheduler_minutely from 48 to 40 bytes.
|
|
The Now variable return the current local time.
Unlike standard library, this is a variable that can be override to mock
the current time during testing.
|
|
|
|
While at it, replace the unit tests with an example so we can both do
unit testing and provide an examples in documentation.
|
|
|
|
|
|
|
|
The valid syntax to suppress linter warnings is "//nolint:<name>" with
no space between comment and "nolint" and between ":". Also, we move the
placement of nolint directive to the top of statements for multiple
nolint in the same scope.
While at it, fix and supress some linter warnings.
|
|
Most of the warnings caused by update to linter which cause global
variables declared with grouping "( ... )" and that has been suppressed,
are become false-positive again.
|
|
Micro seconds is the first six digits after seconds in output of
UnixNano().
|
|
|
|
This package provide library for parsing email message format as
specified in RFC 5322.
|
|
|