Skip to content

Commit cc345e6

Browse files
Fixing lint errors.
1 parent 4891b90 commit cc345e6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

harness/variables.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ func UpdateOrRemoveKeyValue(envVar, key, newValue string, delete bool) error {
129129
return WriteLines(filePath, updatedLines)
130130
}
131131

132-
// Helper function to read lines from a file.
132+
// ReadLines reads lines from a file and returns them as a slice of strings.
133133
func ReadLines(filename string) ([]string, error) {
134134
file, err := os.Open(filename)
135135
if err != nil {
@@ -145,7 +145,7 @@ func ReadLines(filename string) ([]string, error) {
145145
return lines, scanner.Err()
146146
}
147147

148-
// Helper function to write lines to a file.
148+
// WriteLines writes a slice of strings to a file, each string being written to a new line.
149149
func WriteLines(filename string, lines []string) error {
150150
file, err := os.Create(filename)
151151
if err != nil {
@@ -162,7 +162,7 @@ func WriteLines(filename string, lines []string) error {
162162
return nil
163163
}
164164

165-
// Helper function to parse a line into key and value, considering file format.
165+
// ParseKeyValue parses a key-value pair from a string and returns the key and value.
166166
func ParseKeyValue(line, ext string) (string, string) {
167167
if ext == ".env" {
168168
parts := strings.SplitN(line, "=", 2)
@@ -180,7 +180,7 @@ func ParseKeyValue(line, ext string) (string, string) {
180180
return "", ""
181181
}
182182

183-
// Helper function to format a key-value pair as a line, considering file format.
183+
// FormatKeyValue formats a key-value pair into a string.
184184
func FormatKeyValue(key, value, ext string) string {
185185
if ext == ".env" {
186186
return fmt.Sprintf("%s=%s", key, value)

0 commit comments

Comments
 (0)