// GetSHA returns the SHA field if it's non-nil, zero value otherwise.
544079
func (c *CommitResult) GetSHA() string {
	if c == nil || c.SHA == nil {
		return ""
	}
	return *c.SHA
}
801951
func (b *Ball) GetXYWH() (x, y, w, h float32) {
	p := b.GetPosition()
	s := b.GetScale()
	return p.X, p.Y, s.W, s.H
}
998072
func (s *CommonStorageDB) GetValueHash(namespace, collection string, keyHash []byte) (*statedb.VersionedValue, error) {
	keyHashStr := string(keyHash)
	if !s.BytesKeySupported() {
		keyHashStr = base64.StdEncoding.EncodeToString(keyHash)
	}
	return s.GetState(deriveHashedDataNs(namespace, collection), keyHashStr)
}
133688
func (hs Headers) Get(name string) Value {
	for i := 0; i < len(hs); i++ {
		if h := hs[i]; h.Name == name {
			return h.Value
		}
	}
	return nil
}
341270
func (vm *VM) GetSSH(options ssh.Options) (ssh.Client, error) {

	ips, err := util.GetVMIPs(vm, options)
	if err != nil {
		return nil, err
	}

	client := &ssh.SSHClient{
		Creds:   &vm.SSHCreds,
		IP:      ips[0], // public IP
		Options: options,
		Port:    22,
	}
	if err := client.WaitForSSH(SSHTimeout); err != nil {
		return nil, err
	}

	return client, nil

}
269143
func (fi *FastIntegerHashMap) Get(key uint64) (uint64, bool) {
	return fi.packets.get(key)
}
327305
func makeHA1(realm, username, password string, algorithm digestAlgorithm) string {
	A1 := fmt.Sprintf("%s:%s:%s", username, realm, password)
	return hash([]byte(A1), algorithm)
}
736787
func GetSha256() string {
	data := make([]byte, 10)
	_, _ = rand.Read(data)
	uintdata := fmt.Sprintf("%x", sha256.Sum256(data))
	return string(uintdata)[0:32]
}
1175685
func (r *Redis) EvalSha(sha1 string, keys []string, args []string) (*Reply, error) {
	cmds := packArgs("EVALSHA", sha1, len(keys), keys, args)
	return r.ExecuteCommand(cmds...)
}
817867
func (t *Tag) GetSHA() string {
	if t == nil || t.SHA == nil {
		return ""
	}
	return *t.SHA
}
8146
func (c *Config) GetHashCost() int {
	if c.HashCost == 0 {
		return fosite.DefaultBCryptWorkFactor
	}
	return c.HashCost
}
43045
func sha1Hash(slices [][]byte) []byte {
	hsha1 := sha1.New()
	for _, slice := range slices {
		hsha1.Write(slice)
	}
	return hsha1.Sum(nil)
}
1054089
func (r *ReleaseAsset) GetState() string {
	if r == nil || r.State == nil {
		return ""
	}
	return *r.State
}
899684
func GetServiceHash(name string, config *ServiceConfig) string {
	hash := sha1.New()

	io.WriteString(hash, name)

	//Get values of Service through reflection
	val := reflect.ValueOf(config).Elem()

	//Create slice to sort the keys in Service Config, which allow constant hash ordering
	serviceKeys := []string{}

	//Create a data structure of map of values keyed by a string
	unsortedKeyValue := make(map[string]interface{})

	//Get all keys and values in Service Configuration
	for i := 0; i < val.NumField(); i++ {
		valueField := val.Field(i)
		keyField := val.Type().Field(i)

		serviceKeys = append(serviceKeys, keyField.Name)
		unsortedKeyValue[keyField.Name] = valueField.Interface()
	}

	//Sort serviceKeys alphabetically
	sort.Strings(serviceKeys)

	//Go through keys and write hash
	for _, serviceKey := range serviceKeys {
		serviceValue := unsortedKeyValue[serviceKey]

		io.WriteString(hash, fmt.Sprintf("\n  %v: ", serviceKey))

		switch s := serviceValue.(type) {
		case yaml.SliceorMap:
			sliceKeys := []string{}
			for lkey := range s {
				sliceKeys = append(sliceKeys, lkey)
			}
			sort.Strings(sliceKeys)

			for _, sliceKey := range sliceKeys {
				io.WriteString(hash, fmt.Sprintf("%s=%v, ", sliceKey, s[sliceKey]))
			}
		case yaml.MaporEqualSlice:
			for _, sliceKey := range s {
				io.WriteString(hash, fmt.Sprintf("%s, ", sliceKey))
			}
		case yaml.MaporColonSlice:
			for _, sliceKey := range s {
				io.WriteString(hash, fmt.Sprintf("%s, ", sliceKey))
			}
		case yaml.MaporSpaceSlice:
			for _, sliceKey := range s {
				io.WriteString(hash, fmt.Sprintf("%s, ", sliceKey))
			}
		case yaml.Command:
			for _, sliceKey := range s {
				io.WriteString(hash, fmt.Sprintf("%s, ", sliceKey))
			}
		case yaml.Stringorslice:
			sort.Strings(s)

			for _, sliceKey := range s {
				io.WriteString(hash, fmt.Sprintf("%s, ", sliceKey))
			}
		case []string:
			sliceKeys := s
			sort.Strings(sliceKeys)

			for _, sliceKey := range sliceKeys {
				io.WriteString(hash, fmt.Sprintf("%s, ", sliceKey))
			}
		case *yaml.Networks:
			io.WriteString(hash, fmt.Sprintf("%s, ", s.HashString()))
		case *yaml.Volumes:
			io.WriteString(hash, fmt.Sprintf("%s, ", s.HashString()))
		default:
			io.WriteString(hash, fmt.Sprintf("%v, ", serviceValue))
		}
	}

	return hex.EncodeToString(hash.Sum(nil))
}
1040224
func (v *StructB) GetAa() (o *StructA) {
	if v != nil && v.Aa != nil {
		return v.Aa
	}

	return
}
1070488
func (c *CommitFile) GetSHA() string {
	if c == nil || c.SHA == nil {
		return ""
	}
	return *c.SHA
}
1083216
func (n *NeutrinoChainConn) GetBlockHash(blockHeight int64) (*chainhash.Hash, error) {
	return n.p2pNode.GetBlockHash(blockHeight)
}