Skip to content

Instantly share code, notes, and snippets.

@taigrr
Created August 26, 2025 14:12
Show Gist options
  • Select an option

  • Save taigrr/4795bcb995b034afc22fc906b50bdae5 to your computer and use it in GitHub Desktop.

Select an option

Save taigrr/4795bcb995b034afc22fc906b50bdae5 to your computer and use it in GitHub Desktop.
steakhouse submission 2025-08-26T14:12:44Z
package main
import (
"bufio"
"os"
"strings"
)
func SearchString(input *os.File) (string, error) {
var result string
scanner := bufio.NewScanner(input)
for scanner.Scan() {
line := scanner.Text()
if strings.Contains(line, "gc25") {
result = line
break
}
}
if err := scanner.Err(); err != nil {
return "", err
}
return result, nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment