github.com/fumiama/go-registry@v0.2.7/storage.go (about)

     1  package registry
     2  
     3  import "crypto/md5"
     4  
     5  type Storage struct {
     6  	Md5 [md5.Size]byte
     7  	m   map[string]string
     8  }
     9  
    10  func (s *Storage) Get(key string) (string, error) {
    11  	v, ok := s.m[key]
    12  	if ok {
    13  		return v, nil
    14  	}
    15  	return "", ErrNoSuchKey
    16  }