changeset.go 211 B

12345678910111213
  1. package source
  2. import (
  3. "crypto/md5"
  4. "fmt"
  5. )
  6. // Sum returns the md5 checksum of the ChangeSet data
  7. func (c *ChangeSet) Sum() string {
  8. h := md5.New()
  9. h.Write(c.Data)
  10. return fmt.Sprintf("%x", h.Sum(nil))
  11. }