package
2.1.3+incompatible
Repository: https://github.com/open-cmsis-pack/cpackget.git
Documentation: pkg.go.dev
# Functions
No description provided by the author
No description provided by the author
CopyFile copies the contents of source into a new file in destination.
CountLines returns the number of lines in a string Ref: https://stackoverflow.com/a/24563853.
DirExists checks if dirPath is an actual directory in the local file system.
DownloadFile downloads a file from an URL and saves it locally under destionationFilePath.
EnsureDir recursevily creates a directory tree if it doesn't exist already.
ExtractPackInfo takes in a path to a pack and extracts the needed information.
FileExists checks if filePath is an actual file in the local file system.
FilterPackId returns the original string if any of the received filter words are present - designed specifically to filter pack IDs.
FormatPackVersion returns a modern representation of an internally versioned pack (for dependencies).
No description provided by the author
No description provided by the author
IsBase64 tells whether a string is correctly b64 encoded.
IsEmpty tells whether a directory specified by "dir" is empty or not.
IsPackNameValid checks whether a pack name string matches specified regular expression.
IsVendorNameValid checks whether a pack vendor name string matches specified regular expression.
IsPackVersion checks whether a pack version string matches specified regular expression.
IsTerminalInteractive tells whether or not the current terminal is capable of complex interactions.
ListDir generates a list of files and directories in "dir".
MoveFile moves a file from one source to destination.
No description provided by the author
RandStringBytes returns a random string with n bytes long Ref: https://stackoverflow.com/a/31832326/3908350.
ReadXML reads in a file into an XML struct.
No description provided by the author
SecureCopy avoids potential DoS vulnerabilities when downloading a stream from a remote origin or decompressing a file.
SecureInflateFile avoids potentions file traversal vulnerabilities when inflating compressed files.
SemverCompare extends `semver.Compare` to work with leading zeros.
SemverCompareRange returns an integer comparing version to range given as low[:high] according to semantic version precedence.
SemverMajor extends `semver.Major` to work with leading zeros.
strips `+meta` from the supplied version string.
No description provided by the author
SetReadOnly takes in a file or directory and set it to read-only mode.
SetReadOnlyR works the same as SetReadOnly, except that it is recursive.
No description provided by the author
startSignalWatcher spins off a thread monitoring termination signals and retuns a function that returns whether termination was requested.
stopSignalWatcher sends a fake signal to the monitoring thread making it terminate.
TouchFile touches the file specified by filePath.
UnsetReadOnly takes in a file or directory and set it to read-only mode.
UnsetReadOnlyR works the same as UnsetReadOnly, but recursive.
WriteXML writes an XML struct to a file.
# Constants
Examples: Vendor::PackName, Vendor.PackName.
DownloadBufferSize is the number of bytes to transfer from the stream to the downloaded file per iteration.
Examples: Vendor::[email protected], Vendor.PackName.x.y.z.
Example: Vendor::PackName@>=x.y.z.
Example: Vendor::PackName@^x.y.z (the greatest version of the pack keeping the same major number).
Example: Vendor::PackName@latest.
For the <package/requirements/packages> spec only.
# Variables
CacheDir is used for cpackget to temporarily host downloaded pack files before moving it to CMSIS_PACK_ROOT.
Directory RO (ReadOnly + Traverse) and RW (Read + Write + Traverse) modes.
No description provided by the author
File RO (ReadOnly) and RW (Read + Write) modes.
No description provided by the author
No description provided by the author
MaxDownloadSize determines that the max file to be downloaded.
ShouldAbortFunction is a function that determines whether early termination was requested by the user.
# Structs
No description provided by the author
PackInfo defines a basic pack information set.
No description provided by the author