Skip to content

Commit 0134d57

Browse files
ccoVeilleingydotnet
authored andcommitted
Fix godoc for re-exported blocks of comments
When re-exporting a block of comments, we added a comment just before the block to indicate that the block is re-exported. But the godoc will be rendered as being the comment for the next declaration, so the godoc of the first declaration. This leads to confusion when reading the documentation of the package. The "re-exported comment" shouldn't be visible in the publicly.
1 parent 866cff5 commit 0134d57

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

yaml.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,13 +264,15 @@ type Unmarshaler interface {
264264
}
265265

266266
// Re-export stream-related types
267+
267268
type (
268269
VersionDirective = libyaml.StreamVersionDirective
269270
TagDirective = libyaml.StreamTagDirective
270271
Encoding = libyaml.Encoding
271272
)
272273

273274
// Re-export encoding constants
275+
274276
const (
275277
EncodingAny = libyaml.ANY_ENCODING
276278
EncodingUTF8 = libyaml.UTF8_ENCODING
@@ -279,6 +281,7 @@ const (
279281
)
280282

281283
// Re-export error types
284+
282285
type (
283286

284287
// LoadError represents an error encountered while decoding a YAML document.
@@ -301,6 +304,7 @@ type (
301304
)
302305

303306
// Re-export Kind constants
307+
304308
const (
305309
DocumentNode = libyaml.DocumentNode
306310
SequenceNode = libyaml.SequenceNode
@@ -311,6 +315,7 @@ const (
311315
)
312316

313317
// Re-export Style constants
318+
314319
const (
315320
TaggedStyle = libyaml.TaggedStyle
316321
DoubleQuotedStyle = libyaml.DoubleQuotedStyle
@@ -324,6 +329,7 @@ const (
324329
type LineBreak = libyaml.LineBreak
325330

326331
// Line break constants for different platforms.
332+
327333
const (
328334
LineBreakLN = libyaml.LN_BREAK // Unix-style \n (default)
329335
LineBreakCR = libyaml.CR_BREAK // Old Mac-style \r

0 commit comments

Comments
 (0)