|
1 | | -// Copyright 2025 The kpt Authors |
| 1 | +// Copyright 2025-2026 The kpt Authors |
2 | 2 | // |
3 | 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
4 | 4 | // you may not use this file except in compliance with the License. |
@@ -42,26 +42,26 @@ type DocOutput struct { |
42 | 42 | // "no documentation available" message. |
43 | 43 | func RenderHelp(w io.Writer, sections Sections, meta Metadata) { |
44 | 44 | if sections.Short == "" && sections.Long == "" && sections.Examples == "" && isMetadataEmpty(meta) { |
45 | | - fmt.Fprint(w, "No documentation available. Pass fn.WithDocs to fn.AsMain to enable --help.\n") |
| 45 | + _, _ = fmt.Fprint(w, "No documentation available. Pass fn.WithDocs to fn.AsMain to enable --help.\n") |
46 | 46 | return |
47 | 47 | } |
48 | 48 |
|
49 | 49 | if sections.Short != "" { |
50 | | - fmt.Fprintf(w, "%s\n", sections.Short) |
| 50 | + _, _ = fmt.Fprintf(w, "%s\n", sections.Short) |
51 | 51 | } |
52 | 52 |
|
53 | 53 | if sections.Long != "" { |
54 | 54 | if sections.Short != "" { |
55 | | - fmt.Fprint(w, "\n") |
| 55 | + _, _ = fmt.Fprint(w, "\n") |
56 | 56 | } |
57 | | - fmt.Fprintf(w, "%s\n", sections.Long) |
| 57 | + _, _ = fmt.Fprintf(w, "%s\n", sections.Long) |
58 | 58 | } |
59 | 59 |
|
60 | 60 | if sections.Examples != "" { |
61 | 61 | if sections.Short != "" || sections.Long != "" { |
62 | | - fmt.Fprint(w, "\n") |
| 62 | + _, _ = fmt.Fprint(w, "\n") |
63 | 63 | } |
64 | | - fmt.Fprintf(w, "Examples:\n%s\n", sections.Examples) |
| 64 | + _, _ = fmt.Fprintf(w, "Examples:\n%s\n", sections.Examples) |
65 | 65 | } |
66 | 66 | } |
67 | 67 |
|
|
0 commit comments