It seems obvious (to me) that the encoding.TextUnmarshaler interface could
be implemented for time.Duration (it is implemented for time.Time,
afterall).
The fact that it is not gives me pause... is there a good reason that the
stdlib has not done this? What issues am I facing if I do this:
On Mon, Jan 17, 2022 at 7:07 PM Paulo Júnior wrote:
>
> I'm studying about if statement and comma ok construction and I'm not sure
> why the piece of code (https://go.dev/play/p/ScFJsih6lwR) bellow does not
> work. The compiler says that: x declared but not used. However, x is used in
> the
Hi all.
I'm studying about *if statement* and *comma ok construction* and I'm not
sure why the piece of code (https://go.dev/play/p/ScFJsih6lwR) bellow does
not work. The compiler says that: *x declared but not used*. However, *x* is
used in the second *if statement *of the *main function*, as
OK Thanks!!
On Mon, Jan 17, 2022 at 1:03 PM Axel Wagner
wrote:
> On Mon, Jan 17, 2022 at 6:57 PM Rich wrote:
>
>> What I am worried about is that my version of log will diverge from the
>> Go standard log package. Is there a way to extend an existing package so
>> that my adds to the log
> server.Version, server.Address, server.Port)
>
> That would print to both stdout and to the logfile lgOut is configured for.
> Ex:
> 20220117-13:45 | Server Version 1.0.1 Started and listens on
> 127.0.0.1:8080"
>
> What I am worried about is that my version of log w
On Mon, Jan 17, 2022 at 6:57 PM Rich wrote:
> What I am worried about is that my version of log will diverge from the Go
> standard log package. Is there a way to extend an existing package so
> that my adds to the log package pulls from whatever happens to be the most
> current version of
er.Version, server.Address, server.Port)
That would print to both stdout and to the logfile lgOut is configured for.
Ex:
20220117-13:45 | Server Version 1.0.1 Started and listens on 127.0.0.1:8080"
What I am worried about is that my version of log will diverge from the Go
standard log package.