// UnmarshalFlag satisifes the flags.Unmarshaler interface.
511796
func (a *AmountFlag) UnmarshalFlag(value string) error {
	value = strings.TrimSuffix(value, " BTC")
	valueF64, err := strconv.ParseFloat(value, 64)
	if err != nil {
		return err
	}
	amount, err := btcutil.NewAmount(valueF64)
	if err != nil {
		return err
	}
	a.Amount = amount
	return nil
}
765406
func Unmarshal(data []byte) (*HLLPP, error) {
	if len(data) < marshalHeaderSize {
		return nil, fmt.Errorf("data too short (%d bytes)", len(data))
	}

	offset := 0

	version := binary.BigEndian.Uint16(data[offset:])
	offset += 2

	if version != marshalVersion {
		return nil, fmt.Errorf("unknown version: %d", version)
	}

	length := binary.BigEndian.Uint32(data[offset:])
	offset += 4

	if int(length) != len(data) {
		return nil, fmt.Errorf("length mismatch: header says %d, was %d", length, len(data))
	}

	flags := binary.BigEndian.Uint16(data[offset:])
	offset += 2

	p := data[offset]
	offset++

	pp := data[offset]
	offset++

	h, err := NewWithConfig(Config{
		Precision:       p,
		SparsePrecision: pp,
	})
	if err != nil {
		return nil, err
	}

	h.sparse = flags&marshalFlagSparse > 0

	h.sparseLength = binary.BigEndian.Uint32(data[offset:])
	offset += 4

	h.bitsPerRegister = uint32(data[offset])
	offset++

	if len(data) > offset {
		h.data = make([]byte, len(data)-offset)
		copy(h.data, data[offset:])
	}

	return h, nil
}
591457
func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
	type Config struct {
		Genesis                 *core.Genesis `toml:",omitempty"`
		NetworkId               *uint64
		SyncMode                *downloader.SyncMode
		NoPruning               *bool
		NoPrefetch              *bool
		Whitelist               map[uint64]common.Hash `toml:"-"`
		LightServ               *int                   `toml:",omitempty"`
		LightBandwidthIn        *int                   `toml:",omitempty"`
		LightBandwidthOut       *int                   `toml:",omitempty"`
		LightPeers              *int                   `toml:",omitempty"`
		OnlyAnnounce            *bool
		ULC                     *ULCConfig `toml:",omitempty"`
		SkipBcVersionCheck      *bool      `toml:"-"`
		DatabaseHandles         *int       `toml:"-"`
		DatabaseCache           *int
		TrieCleanCache          *int
		TrieDirtyCache          *int
		TrieTimeout             *time.Duration
		Miner                   *miner.Config
		Ethash                  *ethash.Config
		TxPool                  *core.TxPoolConfig
		GPO                     *gasprice.Config
		EnablePreimageRecording *bool
		DocRoot                 *string `toml:"-"`
		EWASMInterpreter        *string
		EVMInterpreter          *string
		ConstantinopleOverride  *big.Int
		RPCGasCap               *big.Int `toml:",omitempty"`
	}
	var dec Config
	if err := unmarshal(&dec); err != nil {
		return err
	}
	if dec.Genesis != nil {
		c.Genesis = dec.Genesis
	}
	if dec.NetworkId != nil {
		c.NetworkId = *dec.NetworkId
	}
	if dec.SyncMode != nil {
		c.SyncMode = *dec.SyncMode
	}
	if dec.NoPruning != nil {
		c.NoPruning = *dec.NoPruning
	}
	if dec.NoPrefetch != nil {
		c.NoPrefetch = *dec.NoPrefetch
	}
	if dec.Whitelist != nil {
		c.Whitelist = dec.Whitelist
	}
	if dec.LightServ != nil {
		c.LightServ = *dec.LightServ
	}
	if dec.LightBandwidthIn != nil {
		c.LightBandwidthIn = *dec.LightBandwidthIn
	}
	if dec.LightBandwidthOut != nil {
		c.LightBandwidthOut = *dec.LightBandwidthOut
	}
	if dec.LightPeers != nil {
		c.LightPeers = *dec.LightPeers
	}
	if dec.OnlyAnnounce != nil {
		c.OnlyAnnounce = *dec.OnlyAnnounce
	}
	if dec.ULC != nil {
		c.ULC = dec.ULC
	}
	if dec.SkipBcVersionCheck != nil {
		c.SkipBcVersionCheck = *dec.SkipBcVersionCheck
	}
	if dec.DatabaseHandles != nil {
		c.DatabaseHandles = *dec.DatabaseHandles
	}
	if dec.DatabaseCache != nil {
		c.DatabaseCache = *dec.DatabaseCache
	}
	if dec.TrieCleanCache != nil {
		c.TrieCleanCache = *dec.TrieCleanCache
	}
	if dec.TrieDirtyCache != nil {
		c.TrieDirtyCache = *dec.TrieDirtyCache
	}
	if dec.TrieTimeout != nil {
		c.TrieTimeout = *dec.TrieTimeout
	}
	if dec.Miner != nil {
		c.Miner = *dec.Miner
	}
	if dec.Ethash != nil {
		c.Ethash = *dec.Ethash
	}
	if dec.TxPool != nil {
		c.TxPool = *dec.TxPool
	}
	if dec.GPO != nil {
		c.GPO = *dec.GPO
	}
	if dec.EnablePreimageRecording != nil {
		c.EnablePreimageRecording = *dec.EnablePreimageRecording
	}
	if dec.DocRoot != nil {
		c.DocRoot = *dec.DocRoot
	}
	if dec.EWASMInterpreter != nil {
		c.EWASMInterpreter = *dec.EWASMInterpreter
	}
	if dec.EVMInterpreter != nil {
		c.EVMInterpreter = *dec.EVMInterpreter
	}
	if dec.ConstantinopleOverride != nil {
		c.ConstantinopleOverride = dec.ConstantinopleOverride
	}
	if dec.RPCGasCap != nil {
		c.RPCGasCap = dec.RPCGasCap
	}
	return nil
}
788161
func (d *decodeState) unmarshalLiteral(data Slice, v reflect.Value) {
	d.literalStore(data, v, false)
}
68966
func (k *Kubernetes) UnmarshalTOML(data interface{}) error {
	dataOK, ok := data.(map[string]interface{})
	if !ok {
		return errors.New("bad url for kubernetes input plugin")
	}
	k.URL, _ = dataOK["url"].(string)
	return nil
}
403940
func (n *AppNonce) Unmarshal(data []byte) error {
	*n = [3]byte{} // Reset the receiver
	return n.UnmarshalBinary(data)
}
1237032
func (t *Tree) Unmarshal(v interface{}) error {
	d := Decoder{tval: t, tagName: tagFieldName}
	return d.unmarshal(v)
}
593649
func (j *JSONBuiltin) Unmarshal(data []byte, v interface{}) error {
	return json.Unmarshal(data, v)
}
1303128
func (r *Raw) Unmarshal(data []byte) error {
	if len(data) == 0 {
		r = nil
		return nil
	}
	id := Raw(make([]byte, len(data)))
	copy(id, data)
	*r = id
	return nil
}
880871
func (datr *DataRate) Unmarshal(data []byte) error {
	*datr = DataRate{} // Reset the receiver
	return datr.UnmarshalBinary(data)
}
1289340
func DefaultMarshalFunc(obj runtime.Object, gv schema.GroupVersion) ([]byte, error) {
	return kubeadmutil.MarshalToYaml(obj, gv)
}
722369
func Unmarshal(data []byte, v interface{}) error {
	err := json.Unmarshal(data, v)
	if err != nil {
		return err
	}

	if ImplementsPostJSONUnmarshaler(v) {
		err := v.(PostJSONUnmarshaler).PostUnmarshalJSON()
		if err != nil {
			return err
		}
	}

	return nil
}
342596
func (s *ClusterService) Unmarshal(data []byte) error {
	newService := NewClusterService("", "")

	if err := json.Unmarshal(data, &newService); err != nil {
		return err
	}

	*s = newService

	return nil
}
994504
func (a *FlagArray) UnmarshalYAML(unmarshal func(interface{}) error) error {
	var flags []string
	if err := unmarshal(&flags); err != nil {
		var flagstr string
		if err := unmarshal(&flagstr); err != nil {
			return err
		}
		*a = strings.Fields(flagstr)
	} else {
		*a = flags
	}
	return nil
}
1041428
func UnmarshalUntyped(flags []string, desc *descriptor.DescriptorProto, resolver Resolver) (map[string]interface{}, error) {
	p := parser{resolver}
	return p.parse(flags, desc)
}
357591
func (c *ConfigPolicyNode) UnmarshalJSON(data []byte) error {
	m := map[string]interface{}{}
	decoder := json.NewDecoder(bytes.NewReader(data))
	if err := decoder.Decode(&m); err != nil {
		return err
	}
	if rs, ok := m["rules"]; ok {
		if rules, ok := rs.(map[string]interface{}); ok {
			addRulesToConfigPolicyNode(rules, c)
		}
	}
	return nil
}
719854
func Unmarshal(data []byte, v Unmarshaler) error {
	l := jlexer.Lexer{Data: data}
	v.UnmarshalEasyJSON(&l)
	return l.Error()
}