diff options
| author | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-09-11 18:21:17 +0300 |
|---|---|---|
| committer | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-09-11 18:21:17 +0300 |
| commit | 00361b1099952939bf5bdede7841659b888dd80c (patch) | |
| tree | c16bcdd35adc9c4a3193ab694162205f2c63ed99 /go-src/utils/utils.go | |
| parent | 31918645958b2bf80409a5bcf99d9bb2e775b7b7 (diff) | |
| download | ctfc-00361b1099952939bf5bdede7841659b888dd80c.tar ctfc-00361b1099952939bf5bdede7841659b888dd80c.tar.gz ctfc-00361b1099952939bf5bdede7841659b888dd80c.zip | |
Implemented editing chats
Diffstat (limited to 'go-src/utils/utils.go')
| -rw-r--r-- | go-src/utils/utils.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/go-src/utils/utils.go b/go-src/utils/utils.go index 271dd3e..537037f 100644 --- a/go-src/utils/utils.go +++ b/go-src/utils/utils.go @@ -50,6 +50,11 @@ func PathExists(path string) bool { return !os.IsNotExist(err) } +func GetFileContents(path string) []string { + input, _ := os.ReadFile(path) + return strings.Split(string(input), "\n") +} + func StrShortenRight(s *string, amount int) { *s = (*s)[:len(*s)-amount] } |
