github.com/lukasheimann/cloudfoundrycli@v7.1.0+incompatible/actor/pluginaction/checksum.go (about)

     1  package pluginaction
     2  
     3  import "code.cloudfoundry.org/cli/util/configv3"
     4  
     5  func (actor Actor) ValidateFileChecksum(path string, checksum string) bool {
     6  	plugin := configv3.Plugin{Location: path}
     7  	return plugin.CalculateSHA1() == checksum
     8  }