X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=main.go;h=d87829610ec267c1d0cc56500aa60cdbf35acf67;hb=d9feddb6cd5898d95dc1b92e3167aea535b3aa9e;hp=1e717eccb7c519da4ba556a1a5c79a86281f0e9c;hpb=7a622bab122020ebab3232aafa84997b20d3189f;p=mmfileget.git diff --git a/main.go b/main.go index 1e717ec..d878296 100644 --- 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]