1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-01-05 10:20:53 +02:00
go-micro/config/source/changeset.go

14 lines
212 B
Go
Raw Normal View History

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