// WithData allows the source data to be set
168939
func WithData(d []byte) source.Option {
	return func(o *source.Options) {
		if o.Context == nil {
			o.Context = context.Background()
		}
		o.Context = context.WithValue(o.Context, changeSetKey{}, &source.ChangeSet{
			Data:   d,
			Format: "json",
		})
	}
}
1369390
func (c *IndexedDB) RequestDataWithParams(v *IndexedDBRequestDataParams) ([]*IndexedDBDataEntry, bool, error) {
	resp, err := gcdmessage.SendCustomReturn(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "IndexedDB.requestData", Params: v})
	if err != nil {
		return nil, false, err
	}

	var chromeData struct {
		Result struct {
			ObjectStoreDataEntries []*IndexedDBDataEntry
			HasMore                bool
		}
	}

	if resp == nil {
		return nil, false, &gcdmessage.ChromeEmptyResponseErr{}
	}

	// test if error first
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return nil, false, &gcdmessage.ChromeRequestErr{Resp: cerr}
	}

	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return nil, false, err
	}

	return chromeData.Result.ObjectStoreDataEntries, chromeData.Result.HasMore, nil
}
794366
func (l *LagerAdapter) WithData(data lager.Data) lager.Logger {
	return &LagerAdapter{
		originalLogger: l.originalLogger.With(dataToFields([]lager.Data{data})...),
	}
}
479713
func formatData(value interface{}) (formatted interface{}) {
	switch value := value.(type) {
	case json.Marshaler:
		return value
	case error:
		return value.Error()
	case fmt.Stringer:
		return value.String()
	default:
		return value
	}
}
881819
func (c *HookContext) ActionData() (*ActionData, error) {
	if c.actionData == nil {
		return nil, errors.New("not running an action")
	}
	return c.actionData, nil
}
630245
func withDatabase(db database) *Dataset {
	ret := new(Dataset)
	ret.database = db
	ret.clauses = clauses{
		Select: cols(Star()),
	}
	ret.adapter = db.queryAdapter(ret)
	return ret
}
42761
func (F *Frisby) SetDatas(datas map[string]string) *Frisby {
	if F.Req.Data == nil {
		F.Req.Data = make(map[string]string)
	}
	for key, value := range datas {
		F.Req.Data[key] = value
	}
	return F
}
825848
func (s *ServerLaunchConfiguration) SetUserData(v *UserData) *ServerLaunchConfiguration {
	s.UserData = v
	return s
}
311073
func SetMetadata(data, metadata []byte, format string) (newData []byte, err error) {
	return webpSetMetadata(data, metadata, format)
}
507560
func DataWithContentType(filename string, source io.Reader, contentType string) *BinaryData {
	return &BinaryData{
		Filename:    filename,
		Source:      source,
		ContentType: contentType,
	}
}
68401
func (a *Attempt_Data) UpdateWith(other *Attempt_Data) {
	if a.Created == nil {
		a.Created = other.Created
	}
	if other.Modified != nil {
		a.Modified = other.Modified
	}
	a.NumExecutions = other.NumExecutions
	if other.AttemptType != nil {
		a.AttemptType = other.AttemptType
	}
}
777534
func (coff *Coff) AddData(symbol string, data Sizer) {
	coff.addSymbol(symbol)
	coff.Data = append(coff.Data, data)
	coff.SectionHeader32.SizeOfRawData += uint32(data.Size())
}
908996
func (s *Content) SetData(v string) *Content {
	s.Data = &v
	return s
}
142880
func (t *Table) AppendData(rec map[string]interface{}) *Table {
	t.Data = append(t.Data, rec)
	return t
}
1196929
func (e *Execution_Data) UpdateWith(other *Execution_Data) {
	if e.Created == nil {
		e.Created = other.Created
	}
	if other.Modified != nil {
		e.Modified = other.Modified
	}
	if other.DistributorInfo != nil {
		e.DistributorInfo = other.DistributorInfo
	}
	if other.ExecutionType != nil {
		e.ExecutionType = other.ExecutionType
	}
}
887570
func (c *Context) WriteData(data interface{}) (err error) {
	var bytes []byte
	if bytes, err = c.Serialize(data); err == nil {
		_, err = c.Write(bytes)
	}
	return
}
1260332
func withMetadata(c context.Context, cli *metadata.Client) context.Context {
	return context.WithValue(c, &metaKey, cli)
}