Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Commit 2fde7ae

Browse files
committed
Fix missing lint errors
1 parent 4870fc3 commit 2fde7ae

6 files changed

Lines changed: 33 additions & 33 deletions

File tree

internals/cli/clip/fakeclip/clip.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build !production
1+
//go:build !production
22

33
// Package fakeclip provides fake implementations of the clip.Clipper interface
44
// to be used for testing.

internals/cli/cobra_template.go

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -378,21 +378,21 @@ func numFlags(flagSet pflag.FlagSet) int {
378378

379379
// UsageTemplate is the custom usage template of the command.
380380
// Changes in comparison to cobra's default template:
381-
// 1. Usage section
382-
// a. `[flags]` is placed before the arguments.
383-
// b. All arguments are put in the usage in their proper order.
384-
// c. Where applicable, the argument name is replaced with its placeholder.
385-
// 2. Commands section
386-
// a. For the root command (`secrethub`) the commands are grouped into
387-
// `Management commands` and `Commands`
388-
// 2. Flags section
389-
// a. Flag's type was removed.
390-
// b. The help text for flags is well divided into its own column, thus
391-
// making the visibility of the flags better.
392-
// c. At the end of a flag's help text, the name of its environment variable is
393-
// displayed between brackets.
394-
// d. The section is hidden if the only flag is `--help`.
395-
// 4. Arguments section (created by us)
381+
// 1. Usage section
382+
// a. `[flags]` is placed before the arguments.
383+
// b. All arguments are put in the usage in their proper order.
384+
// c. Where applicable, the argument name is replaced with its placeholder.
385+
// 2. Commands section
386+
// a. For the root command (`secrethub`) the commands are grouped into
387+
// `Management commands` and `Commands`
388+
// 2. Flags section
389+
// a. Flag's type was removed.
390+
// b. The help text for flags is well divided into its own column, thus
391+
// making the visibility of the flags better.
392+
// c. At the end of a flag's help text, the name of its environment variable is
393+
// displayed between brackets.
394+
// d. The section is hidden if the only flag is `--help`.
395+
// 4. Arguments section (created by us)
396396
var UsageTemplate = `Usage:
397397
{{if .Cmd.Runnable}} {{(useLine .Cmd .Args)}}{{end}}
398398
{{- if .Cmd.HasAvailableSubCommands}} {{ .Cmd.CommandPath}} [command]{{end}}

internals/cli/mlock/mlock_unavailable.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build android darwin nacl netbsd plan9 windows
1+
//go:build android || darwin || nacl || netbsd || plan9 || windows
22

33
package mlock
44

internals/secrethub/tpl/v2.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,17 @@ type parserV2 struct{}
8484
// Parse parses a secret template from a raw string.
8585
//
8686
// Syntax rules:
87-
// - A secret template can contain references to secrets in secret tags. A
88-
// secret tag is enclosed in double brackets: `{{ path/to/secret }}`.
89-
// - A secret template can contain references to variables in variable tags. A
90-
// variable tag is enclosed between ${ and }: `${ variable }`.
91-
// - Extra spaces can be added just after the opening delimiter and just before the
92-
// closing delimiter of a tag: {{ path/to/secret }} has the same output as
93-
// {{path/to/secret}} has.
94-
// - Secret tags can also contain variable tags: `{{ path/with/${var}/to/secret }}`
95-
// - Variable tags cannot contain secret tags.
96-
// - Secret tags cannot contain secret tags (they cannot be nested).
97-
// - Variable tags cannot contain variable tags (they cannot be nested).
87+
// - A secret template can contain references to secrets in secret tags. A
88+
// secret tag is enclosed in double brackets: `{{ path/to/secret }}`.
89+
// - A secret template can contain references to variables in variable tags. A
90+
// variable tag is enclosed between ${ and }: `${ variable }`.
91+
// - Extra spaces can be added just after the opening delimiter and just before the
92+
// closing delimiter of a tag: {{ path/to/secret }} has the same output as
93+
// {{path/to/secret}} has.
94+
// - Secret tags can also contain variable tags: `{{ path/with/${var}/to/secret }}`
95+
// - Variable tags cannot contain secret tags.
96+
// - Secret tags cannot contain secret tags (they cannot be nested).
97+
// - Variable tags cannot contain variable tags (they cannot be nested).
9898
func (p parserV2) Parse(raw string, line, column int) (Template, error) {
9999
parser := newV2Parser(bytes.NewBufferString(raw), line, column)
100100

internals/winrm/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ type Config struct {
4646
CaCert []byte
4747
}
4848

49-
/// authMethod gives an interface to retrieve the valid credentials or defaults.
49+
// authMethod gives an interface to retrieve the valid credentials or defaults.
5050
// The Client always needs both values for certificates authentication and basic authentication.
5151
// So we use implementations of this interface to give us the values without having to know the implementation.
5252
// The necessity of this is because of the weird interface giving by our dependency on the masterzen/winrm library.

internals/winrm/copy.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ var (
2222

2323
// doCopy copies the contents from the io.Reader into the to path.
2424
// The copy process is done in multiple steps:
25-
// 1. The content is uploaded to a temporary file in chunks
26-
// 2. The content is restored from the chunks into a single file at the target location.
27-
// 3. The temporary file is removed.
25+
// 1. The content is uploaded to a temporary file in chunks
26+
// 2. The content is restored from the chunks into a single file at the target location.
27+
// 3. The temporary file is removed.
2828
//
2929
// Progress is reported in the progress channel given as a variable.
3030
func doCopy(client *winrm.Client, in io.Reader, toPath string, progress chan int) error {
@@ -75,7 +75,7 @@ func uploadContent(client *winrm.Client, maxChunks int, filePath string, reader
7575
}
7676

7777
// uploadChunks uploads the content by dividing the content into multiple chunks.
78-
// The chunks are combined into a single file.
78+
//  The chunks are combined into a single file.
7979
// The chunks are used to get around the maximum command line size limit.
8080
// This allows us to use the winRM connection for uploading files.
8181
func uploadChunks(client *winrm.Client, filePath string, maxChunks int, reader io.Reader) (done bool, err error) {

0 commit comments

Comments
 (0)