mirror of
https://github.com/lyx0/nourybot.git
synced 2024-11-13 19:49:55 +01:00
generate a uuid as filename for yaf text uploads
This commit is contained in:
parent
d0cb43d1f3
commit
3642ef8a30
|
@ -20,6 +20,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/gempir/go-twitch-irc/v4"
|
"github.com/gempir/go-twitch-irc/v4"
|
||||||
|
"github.com/google/uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -367,7 +368,8 @@ func (app *application) YafUpload(target, path, identifier string, msg twitch.Pr
|
||||||
}
|
}
|
||||||
|
|
||||||
func (app *application) YafUploadString(text string) string {
|
func (app *application) YafUploadString(text string) string {
|
||||||
path := "output.txt"
|
path := uuid.NewString()
|
||||||
|
app.Log.Info(path)
|
||||||
file, err := os.Create(path)
|
file, err := os.Create(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
app.Log.Error("Error creating file:", err)
|
app.Log.Error("Error creating file:", err)
|
||||||
|
|
Loading…
Reference in a new issue