Documentation ¶
Index ¶
Constants ¶
const BYTES_PER_INT = 4
INT_SIZE is the number of bytes we use for a single number to encode.
Variables ¶
This section is empty.
Functions ¶
func CacheTile ¶
CacheTile to disk writes the given tile to the given path. It will first write to a temporary file and then rename it to target path.
func DeserializeTile ¶
DeserializeTile reads the tile from the given reader.
func LoadCachedTile ¶
LoadCachedTile loads the cached tile at the given path. If the path does not exist, it will not return an error, but the returned tile will be nil.
Types ¶
type Sample ¶
type Sample struct { Tile *tiling.Tile Expectations types.Expectations IgnoreRules []*ignore.IgnoreRule }
Sample contains the information necessary to represent the full state of a Gold instance and a sample from a live instance.
func DeserializeSample ¶
DeserializeSample returns a new instance of Sample from the given reader. It is the inverse operation of Sample.Searialize.
func (*Sample) UnmarshalJSON ¶
UnmarshalJSON allows to deserialize an instance of Sample that has been serialized using the json package.