MCPcopy
hub / github.com/tinyauthapp/tinyauth / ReadFile

Function ReadFile

internal/utils/fs_utils.go:5–17  ·  view source on GitHub ↗
(file string)

Source from the content-addressed store, hash-verified

3import "os"
4
5func ReadFile(file string) (string, error) {
6 _, err := os.Stat(file)
7 if err != nil {
8 return "", err
9 }
10
11 data, err := os.ReadFile(file)
12 if err != nil {
13 return "", err
14 }
15
16 return string(data), nil
17}

Callers 3

GetSecretFunction · 0.85
GetUsersFunction · 0.85
TestReadFileFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestReadFileFunction · 0.68