Beispiel #1
0
func (m matcher) matchResources(ifs []IntegrityFields) ([]IntegrityFields, error) {
	matched := make([]IntegrityFields, 0, len(m))
	for _, f := range ifs {

		if f.Size > 65535 && blobstore.Present(f.Sha1) {
			matched = append(matched, f)
		}
	}

	return matched, nil
}
Beispiel #2
0
func main() {
	defer blobstore.Terminate()

	blobstore.Add("key name", os.Args[1])

	present := blobstore.Present("key name")
	if !present {
		panic("Head request failed")
	}

	blobstore.Get("key name", os.Args[2])
}