mirror of
https://github.com/go-micro/go-micro.git
synced 2024-12-18 08:26:38 +02:00
14 lines
211 B
Go
14 lines
211 B
Go
|
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))
|
||
|
}
|