Documentation
¶
Index ¶
Constants ¶
const ( // AskalonoVersion is the version string used in the git tag. These can // be seen here: https://github.com/jpeddicord/askalono/releases/ AskalonoVersion = "0.4.6" )
Variables ¶
var Askalono046Linux []byte
var Askalono046Windows []byte
var Askalono046macOS []byte
var AskalonoHashes = map[string]map[string]string{
"0.4.6": {
"linux": "a089146694cf433a4580c3da414cf43c70722ba6398d214fe41ca27b53deb476",
"darwin": "1e006e6c61ec4abd714ae930a94b2f447c57392d621a6e8367c7aaa4cb4f427c",
"windows": "89f477e6e70e9bb58caf3b1f6a22fc6566e182ff81c3a920d49b6e6947ee97a1",
},
}
AskalonoHashes maps version number, os, and then sha256sum. These are the hashes of the actual binaries, not the .zip files they are in. We ultimately care just about the integrity of the binary, so that's all we need to check. We don't also need to check the hash of the zip files, since we aren't worried about opening a zip file being dangerous. FIXME: We don't support different architectures for now. (eg: runtime.GOARCH)
Functions ¶
func GetExpectedHash ¶
GetExpectedHash returns the expected hash of the binary for this version and OS.
func GetExpectedName ¶
GetExpectedName returns the expected name of the binary for a given platform. This happens to also be the path it is expected to be found in the zip file because the packages contain that single file in the root. If this ever changes, then we need to add an additional GetExpectedPath method and change the logic.
Types ¶
This section is empty.