Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

interfaceGUID

interfaceGUID exposes a single function CalculateGUID which calculates a unique deterministic value based on the type provided. It is to be used when communicating with remote services to quickly assert common knowledge before starting to communicate, for example via encoding/gob.

GoDoc Build Status Coverage Status

Example

type MyService interface {
  ...
}

guid := interfaceGUID.CalculateGUID(reflect.TypeOf((*MyService)(nil)).Elem())
// Then compare the string with the remote service.

About

Calculates a unique hash based identifier for a Go interface.

Resources

License

Packages

No packages published

Languages