Last active
August 26, 2025 17:23
-
-
Save mdwhatcott/0d54ffd6cfef24ed4a66fcc91c7809f9 to your computer and use it in GitHub Desktop.
steakhouse submission 2025-08-26T15:17:18Z
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 ( | |
| "fmt" | |
| "os" | |
| "strings" | |
| ) | |
| func SearchString(input *os.File) (s string, err error) { | |
| var result strings.Builder | |
| _, _ = fmt.Fprintln(&result, input.Name()) | |
| listing, err := input.ReadDir(0) | |
| for _, entry := range listing { | |
| info, err := entry.Info() | |
| if err != nil { | |
| continue | |
| } | |
| _, _ = fmt.Fprintln(&result, entry.Name(), info.Size(), info.ModTime()) | |
| } | |
| // _, err = io.Copy(&result, input) | |
| return result.String(), err | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment