code: func TagID(t *api.Tag) string {
  	tag := common.JoinInstanceTag(t)
  	if err := common.ValidateInstanceTag(tag); err != nil {
  		panic(err)
  	}
  	digest := sha1.Sum([]byte(tag))
  	return hex.EncodeToString(digest[:])
  }
docs: // TagID calculates Tag entity ID (SHA1 digest) from the given tag.
  //
  // Panics if the tag is invalid.