Fix syntax error in panic calls
This commit is contained in:
parent
ab66b6ff5b
commit
072b626475
|
@ -45,14 +45,14 @@ func main() {
|
||||||
// upload
|
// upload
|
||||||
skylink, err := client.UploadFile("./src.jpg", skynet.DefaultUploadOptions)
|
skylink, err := client.UploadFile("./src.jpg", skynet.DefaultUploadOptions)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic("Unable to upload: %v", err.Error())
|
panic("Unable to upload: " + err.Error())
|
||||||
}
|
}
|
||||||
fmt.Printf("Upload successful, skylink: %v\\n", skylink)
|
fmt.Printf("Upload successful, skylink: %v\\n", skylink)
|
||||||
|
|
||||||
// download
|
// download
|
||||||
err = client.DownloadFile("./dst.jpg", skylink, skynet.DefaultDownloadOptions)
|
err = client.DownloadFile("./dst.jpg", skylink, skynet.DefaultDownloadOptions)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic("Something went wrong, please try again.\\nError: %v", err.Error())
|
panic("Something went wrong, please try again.\\nError: " + err.Error())
|
||||||
}
|
}
|
||||||
fmt.Println("Download successful")
|
fmt.Println("Download successful")
|
||||||
}`;
|
}`;
|
||||||
|
|
Reference in New Issue