Skip to content

Commit 6fccf3a

Browse files
committed
Minor fixes
1 parent e792190 commit 6fccf3a

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

.golangci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 2
1+
version: '2'
22

33
run:
44
timeout: 10m
@@ -26,7 +26,7 @@ linters:
2626
- tparallel
2727
- wastedassign
2828

29-
linters-settings:
29+
linters.settings:
3030
cyclop:
3131
max-complexity: 25
3232
dupl:
@@ -53,7 +53,7 @@ linters-settings:
5353
multi-func: false
5454

5555
issues:
56-
exclude-rules:
56+
exclude:
5757
- path: _test\.go
5858
linters:
5959
- paralleltest

command/compile.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func (c *compileSaveCommand) execute(dir string, force bool, hosts []string) err
4040
if err != nil {
4141
return err
4242
}
43-
return os.WriteFile(c.file, buffer.Bytes(), 0600)
43+
return os.WriteFile(c.file, buffer.Bytes(), 0o600)
4444
}
4545

4646
type compileCommand struct {
@@ -97,18 +97,18 @@ func (c *compileCommand) compileHost(host compiler.ExpandingHostConfig, hosts []
9797
return c.compiler.Compile(host)
9898
}
9999

100-
func (c *compileCommand) printHostConfig(config compiler.HostEntity) error {
101-
_, err := fmt.Fprintf(c.writer, "Host %v\n", config.Host)
100+
func (c *compileCommand) printHostConfig(cfg compiler.HostEntity) error {
101+
_, err := fmt.Fprintf(c.writer, "Host %v\n", cfg.Host)
102102
if err != nil {
103103
return err
104104
}
105-
if config.HostName != "" {
106-
err = c.printHostConfigProperty("HostName", config.HostName)
105+
if cfg.HostName != "" {
106+
err = c.printHostConfigProperty("HostName", cfg.HostName)
107107
if err != nil {
108108
return err
109109
}
110110
}
111-
for _, e := range config.Config {
111+
for _, e := range cfg.Config {
112112
err = c.printHostConfigProperty(e.Key, e.Value)
113113
if err != nil {
114114
return err

0 commit comments

Comments
 (0)