diff options
| Commit | 00361b1099952939bf5bdede7841659b888dd80c (patch) | |
|---|---|---|
| Author | 2021-09-11 18:21:17 +0300 | |
| Committer | 2021-09-11 18:21:17 +0300 | |
| Files | c16bcdd35adc9c4a3193ab694162205f2c63ed99 /go-src/utils | |
| ctfc-00361b1099952939bf5bdede7841659b888dd80c.tar ctfc-00361b1099952939bf5bdede7841659b888dd80c.tar.gz ctfc-00361b1099952939bf5bdede7841659b888dd80c.zip | ||
| Parent | 31918645958b2bf80409a5bcf99d9bb2e775b7b7 (diff) | |
Implemented editing chats
1 files changed, 5 insertions, 0 deletions
| -rw-r--r-- | go-src/utils/utils.go | 5 |
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] } |
