Skip to content

Commit a5e1cca

Browse files
Fix Go formatting issues
- Fix whitespace and alignment in linux.go - Fix blank line spacing in ca.go - Align constant declarations in google.go Resolves CI formatting check failures Co-authored-by: Amp <[email protected]> Amp-Thread-ID: https://ampcode.com/threads/T-5be4213f-26eb-400c-bb7b-d4c79b7ee6fe
1 parent 88dbcd1 commit a5e1cca

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

agent/internal/posture/linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ func (c *LinuxCollector) checkSystemUpdated() bool {
181181
// Exit code 0 means no updates, 100 means updates available
182182
return true
183183
}
184-
184+
185185
return strings.TrimSpace(output) == ""
186186
}
187187

pkg/pki/ca.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ func validatePath(path string) error {
3232
if strings.TrimSpace(path) == "" {
3333
return fmt.Errorf("path is empty")
3434
}
35-
35+
3636
cleaned := filepath.Clean(path)
3737
if strings.Contains(cleaned, "..") {
3838
return fmt.Errorf("path contains directory traversal: %s", path)
3939
}
40-
40+
4141
return nil
4242
}
4343

@@ -121,7 +121,7 @@ func LoadCA(certPath, keyPath string) (*CertificateAuthority, error) {
121121
if err := validatePath(keyPath); err != nil {
122122
return nil, fmt.Errorf("invalid key path: %w", err)
123123
}
124-
124+
125125
// Paths are validated above - G304 is false positive
126126
certPEM, err := os.ReadFile(certPath) // #nosec G304
127127
if err != nil {
@@ -162,7 +162,7 @@ func writeFileSecure(path string, perm os.FileMode, writeFn func(*os.File) error
162162
if err := validatePath(path); err != nil {
163163
return fmt.Errorf("invalid file path: %w", err)
164164
}
165-
165+
166166
if err := os.MkdirAll(filepath.Dir(path), permOwnerReadExecute); err != nil {
167167
return err
168168
}

services/authz/token/google.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ import (
1818
)
1919

2020
const (
21-
jwtPartCount = 3
22-
bitShift = 8
23-
initialCapacity = 0
24-
indexIncrement = 1
21+
jwtPartCount = 3
22+
bitShift = 8
23+
initialCapacity = 0
24+
indexIncrement = 1
2525
)
2626

2727
type googleKey struct {

0 commit comments

Comments
 (0)