]> Sergey Matveev's repositories - mmfileget.git/blobdiff - main.go
Update dependency, move to redo
[mmfileget.git] / main.go
diff --git a/main.go b/main.go
index 1e717eccb7c519da4ba556a1a5c79a86281f0e9c..d87829610ec267c1d0cc56500aa60cdbf35acf67 100644 (file)
--- a/main.go
+++ b/main.go
@@ -7,11 +7,11 @@ import (
        "path/filepath"
        "strings"
 
-       "github.com/mattermost/mattermost-server/model"
+       "github.com/mattermost/mattermost-server/v5/model"
 )
 
 func main() {
-       url := os.Args[1] // https://MACHINE/api/v4/files/FILE
+       url := strings.TrimPrefix(os.Args[1], "-") // -?https://MACHINE/api/v4/files/FILE
        s := strings.Split(url, "/")
        machine, fileId := s[2], s[6]