cmd/media.go
changeset 110 57843255fd1a
parent 81 b1671f83e91b
child 185 564d92b54b00
equal deleted inserted replaced
109:912e72511084 110:57843255fd1a
    52 	p, err := getPrinter()
    52 	p, err := getPrinter()
    53 	if err != nil {
    53 	if err != nil {
    54 		errPrint("Error: %s", err.Error())
    54 		errPrint("Error: %s", err.Error())
    55 		os.Exit(1)
    55 		os.Exit(1)
    56 	}
    56 	}
    57 	return p.PrintObj(attachment, nil, "")
    57 	return p.printObj(attachment)
    58 }
    58 }
    59 
    59 
    60 // uploadFile uploads a media file and returns the attachment ID
    60 // uploadFile uploads a media file and returns the attachment ID
    61 func uploadFile(filePath string) (int64, error) {
    61 func uploadFile(filePath string) (int64, error) {
    62 	attachment, err := gClient.UploadMedia(filePath)
    62 	attachment, err := gClient.UploadMedia(filePath)