micro/config/source/changeset.go

14 lines
211 B
Go
Raw Normal View History

2019-05-31 01:11:13 +03:00
package source
import (
"crypto/md5"
"fmt"
)
// Sum returns the md5 checksum of the ChangeSet data
func (c *ChangeSet) Sum() string {
h := md5.New()
h.Write(c.Data)
return fmt.Sprintf("%x", h.Sum(nil))
}