github.com/micro/go-micro/v2@v2.9.1/config/source/changeset.go (about)

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