Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UploadAsset ¶
func GetAsset ¶
func GetAsset(assetLocation string) (asset UploadAsset, err error)
GetAsset takes a string as argument which must be in the format `<assetformat>=<filename>`.
The function will return an `UploadAsset` object or an error.
The supported formats are `file`, `zip` and `tgz`.
For `file` assets, the function will open the file in read only mode and create an `UploadAsset` object with the file and the file info.
For `zip` and `tgz` assets, the function will use the `createZipFile` and `createTgzFile` functions to create the asset.
An error will be returned if the asset format is not supported or if an error occurs while creating the asset.
Click to show internal directories.
Click to hide internal directories.