mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-06 21:09:30 -06:00
test with activity
This commit is contained in:
parent
8b1d96ec52
commit
501c383c02
4 changed files with 164 additions and 19 deletions
|
|
@ -22,6 +22,7 @@ import (
|
|||
"bytes"
|
||||
"io"
|
||||
"mime/multipart"
|
||||
"net/url"
|
||||
"os"
|
||||
)
|
||||
|
||||
|
|
@ -62,3 +63,13 @@ func CreateMultipartFormData(fieldName string, fileName string, extraFields map[
|
|||
}
|
||||
return b, w, nil
|
||||
}
|
||||
|
||||
// URLMustParse tries to parse the given URL and panics if it can't.
|
||||
// Should only be used in tests.
|
||||
func URLMustParse(stringURL string) *url.URL {
|
||||
u, err := url.Parse(stringURL)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return u
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue