]> Cypherpunks.ru repositories - gostls13.git/commit
log/slog: Reorder doc comment for level constants
authorAllen Li <ayatane@google.com>
Thu, 10 Aug 2023 22:01:32 +0000 (22:01 +0000)
committerJonathan Amsterdam <jba@google.com>
Mon, 30 Oct 2023 17:34:43 +0000 (17:34 +0000)
commit1e95fc7ffe1faa0e329b32015532d9fa58a1a6c9
tree835475a7c7722a50a5620cbe87d48f065ae21e8e
parent8abde68f19ff84c12e8b353e41934999b1bb051c
log/slog: Reorder doc comment for level constants

pkgsite and go doc print the doc comment *after* the code, resulting in:

    const (
            LevelDebug Level = -4
            ...
    )

    Many paragraphs...

    Names for common levels.

The "Names for common levels." feels out of place and confusing at the bottom.

This is also consistent with the recommendation for the first sentence in doc comments to be the "summary".

Change-Id: I656e85e27d2a4b23eaba5f2c1f4f811a88848c83
GitHub-Last-Rev: d9f7ee9b94df6779fcaef64edf3a480459e3ef16
GitHub-Pull-Request: golang/go#61943
Reviewed-on: https://go-review.googlesource.com/c/go/+/518537
Reviewed-by: Alan Donovan <alan@alandonovan.net>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: qiulaidongfeng <2645477756@qq.com>
Reviewed-by: qiulaidongfeng <2645477756@qq.com>
src/log/slog/level.go