// GetNote returns the Note field if it's non-nil, zero value otherwise.
968289
func (a *AuthorizationUpdateRequest) GetNote() string {
	if a == nil || a.Note == nil {
		return ""
	}
	return *a.Note
}
137382
func (_m *Protocol) GetDevice(id uint64) (common.Device, error) {
	ret := _m.Called(id)

	var r0 common.Device
	if rf, ok := ret.Get(0).(func(uint64) common.Device); ok {
		r0 = rf(id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(common.Device)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(uint64) error); ok {
		r1 = rf(id)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
706929
func (r *record) Get(key string) string {
	x, ok := r.index[key]
	if ok && x < len(r.fields) {
		return r.fields[x]
	}
	return ""
}
377536
func GetKeyField(keyString string, v reflect.Value) reflect.Value {
	return v.Elem().FieldByName(keyString)
}
149827
func (s *InviteAccountToOrganizationInput) SetNotes(v string) *InviteAccountToOrganizationInput {
	s.Notes = &v
	return s
}
1120223
func (c *cmdWalletHistory) filterNote(note string) string {
	lines := strings.Split(strings.TrimSpace(note), "\n")
	if len(lines) < 1 {
		return ""
	}
	return strings.TrimSpace(lines[0])
}
1111367
func (c *Client) GetNote(noteID string, version int) (*Note, error) {
	err := c.loginIfNeeded()
	if err != nil {
		return nil, err
	}
	uri := c.apiURL(fmt.Sprintf("/i/%s/v/%d", noteID, version))
	req, err := http.NewRequest("GET", uri, nil)
	if err != nil {
		return nil, err
	}
	req.Header.Add(tokenHeaderName, c.login.AccessToken)
	d, err := httpReadReq(req)
	if err != nil {
		return nil, err
	}
	c.logRaw("%s\n%s\n\n", uri, string(d))
	//fmt.Printf("resp: '%s'\n", string(d))
	var n Note
	err = json.Unmarshal(d, &n)
	if err != nil {
		//log.Fatalf("failed to unmarshal '%s' with '%s'\n", string(d), err)
		return nil, err
	}
	n.Version = version
	n.ID = noteID
	updateNote(&n)
	return &n, nil
}
607685
func (ss *syncSession) addNote(note *SyncNote) {
	select {
	case ss.notes <- note:
	default:
		ss.Lock()
		if !ss.desync {
			log.Warningf("Sync session with %v is desynchronised", ss.node)
			ss.desync = true
		}
		ss.Unlock()
	}
}
264181
func (n *Note) Free() error {
	if n.ptr == nil {
		return ErrInvalid
	}
	runtime.SetFinalizer(n, nil)
	C.git_note_free(n.ptr)
	n.ptr = nil
	return nil
}
1006270
func (c oauthClient) CreateNote(content string, taskID uint) (wl.Note, error) {
	if taskID == 0 {
		return wl.Note{}, errors.New("taskID must be > 0")
	}

	body := []byte(fmt.Sprintf(`{"content":"%s","task_id":%d}`, content, taskID))

	url := fmt.Sprintf("%s/notes", c.apiURL)

	req, err := c.newPostRequest(url, body)
	if err != nil {
		return wl.Note{}, err
	}

	resp, err := c.do(req)
	if err != nil {
		return wl.Note{}, err
	}

	if resp.StatusCode != http.StatusCreated {
		return wl.Note{}, fmt.Errorf("Unexpected response code %d - expected %d", resp.StatusCode, http.StatusCreated)
	}

	note := wl.Note{}
	err = json.NewDecoder(resp.Body).Decode(&note)
	if err != nil {
		return wl.Note{}, err
	}
	return note, nil
}
1238687
func printPaymentFilterNote(note string) string {
	lines := strings.Split(strings.TrimSpace(note), "\n")
	if len(lines) < 1 {
		return ""
	}
	return strings.TrimSpace(lines[0])
}
118323
func (s *UpdateFindingsInput) SetNote(v *NoteUpdate) *UpdateFindingsInput {
	s.Note = v
	return s
}
243206
func (g *Generator) GeneratePrologueNote(note string) {
	g.printf("// Code generated by mockery v%s. DO NOT EDIT.\n", SemVer)
	if note != "" {
		g.printf("\n")
		for _, n := range strings.Split(note, "\\n") {
			g.printf("// %s\n", n)
		}
	}
	g.printf("\n")
}
978322
func (k *Key) GetKey() string {
	if k == nil || k.Key == nil {
		return ""
	}
	return *k.Key
}
1126241
func (f StringField) Get() (val string, err error) {
	b, err := f.db.Get(f.key)
	if err != nil {
		if err == leveldb.ErrNotFound {
			return "", nil
		}
		return "", err
	}
	return string(b), nil
}
95720
func (j *Js) Getkey(key string, i int) *Js {
	num := i - 1
	if i > len((j.data).([]interface{})) {
		j.data = errors.New("index out of range list").Error()
		return j
	}
	if m, ok := (j.data).([]interface{}); ok {
		v := m[num].(map[string]interface{})
		if h, ok := v[key]; ok {
			j.data = h
			return j
		}

	}
	j.data = nil
	return j
}
538877
func (c *NoteCollection) DefaultRef() (string, error) {
	buf := C.git_buf{}

	runtime.LockOSThread()
	defer runtime.UnlockOSThread()

	ecode := C.git_note_default_ref(&buf, c.repo.ptr)
	runtime.KeepAlive(c)
	if ecode < 0 {
		return "", MakeGitError(ecode)
	}

	ret := C.GoString(buf.ptr)
	C.git_buf_dispose(&buf)

	return ret, nil
}