Created
August 26, 2025 14:12
-
-
Save taigrr/4795bcb995b034afc22fc906b50bdae5 to your computer and use it in GitHub Desktop.
steakhouse submission 2025-08-26T14:12:44Z
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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