aboutsummaryrefslogtreecommitdiff
path: root/hotline/files.go
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2022-06-07 16:03:25 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2022-06-07 16:03:25 -0700
commitaeec10158441af3cef925ca55e531a4d5517d5ec (patch)
tree8b95f1cdd61ffd4b1b9e97406da6bed6e24e74ae /hotline/files.go
parentfca1ebde1d6a552ce6e4e995fc12c73450af218b (diff)
Backfill tests and clean up
Diffstat (limited to 'hotline/files.go')
-rw-r--r--hotline/files.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/hotline/files.go b/hotline/files.go
index d07f445..4f55eba 100644
--- a/hotline/files.go
+++ b/hotline/files.go
@@ -10,6 +10,8 @@ import (
"strings"
)
+const incompleteFileSuffix = ".incomplete"
+
func downcaseFileExtension(filename string) string {
splitStr := strings.Split(filename, ".")
ext := strings.ToLower(
@@ -177,8 +179,6 @@ func EncodeFilePath(filePath string) []byte {
return bytes
}
-const incompleteFileSuffix = ".incomplete"
-
// effectiveFile wraps os.Open to check for the presence of a partial file transfer as a fallback
func effectiveFile(filePath string) (*os.File, error) {
file, err := os.Open(filePath)