Documentation ¶
Index ¶
Constants ¶
const ( // Version is the current version of siad. Version = "1.0.1" // MaxEncodedVersionLength is the maximum length of a version string encoded // with the encode package. 100 is much larger than any version number we send // now, but it allows us to send additional information in the version string // later if we choose. For example appending the version string with the HEAD // commit hash. MaxEncodedVersionLength = 100 )
const DEBUG = false
const Release = "standard"
Variables ¶
var ( // SiaTestingDir is the directory that contains all of the files and // folders created during testing. SiaTestingDir = filepath.Join(os.TempDir(), "SiaTesting") )
Functions ¶
func Critical ¶
func Critical(v ...interface{})
Critical will print a message to os.Stderr unless DEBUG has been set, in which case panic will be called instead.
func JoinErrors ¶
JoinErrors concatenates the elements of errs to create a single error. The separator string sep is placed between elements in the resulting error. Nil errors are skipped. If errs is empty or only contains nil elements, JoinErrors returns nil.
func TempDir ¶
TempDir joins the provided directories and prefixes them with the Sia testing directory.
func VersionCmp ¶
VersionCmp returns an int indicating the difference between a and b. It follows the convention of bytes.Compare and big.Cmp:
-1 if a < b 0 if a == b +1 if a > b
One important quirk is that "1.1.0" is considered newer than "1.1", despite being numerically equal.
Types ¶
This section is empty.