renamed ReadFile to ReadTextFile

This commit is contained in:
Dan Anglin 2024-08-15 15:33:11 +01:00
parent df38f0f62f
commit 4472808f20
Signed by: dananglin
GPG key ID: 0C1D44CFBEE68638
2 changed files with 3 additions and 3 deletions

View file

@ -137,7 +137,7 @@ func (c *CreateExecutor) createStatus(gtsClient *client.Client) error {
case c.content != "":
content = c.content
case c.fromFile != "":
content, err = utilities.ReadFile(c.fromFile)
content, err = utilities.ReadTextFile(c.fromFile)
if err != nil {
return fmt.Errorf("unable to get the status contents from %q: %w", c.fromFile, err)
}

View file

@ -15,10 +15,10 @@ func ReadContents(text string) (string, error) {
return text, nil
}
return ReadFile(strings.TrimPrefix(text, filePrefix))
return ReadTextFile(strings.TrimPrefix(text, filePrefix))
}
func ReadFile(path string) (string, error) {
func ReadTextFile(path string) (string, error) {
file, err := os.Open(path)
if err != nil {
return "", fmt.Errorf("unable to open %q: %w", path, err)