func Map(notes Notes) map[string]Note {
	var m = make(map[string]Note)
	for _, note := range notes {
		m[note.UID] = note
	}
	return m
}
Map of notes key'd by uid
package main
import (
	"bytes"
	"encoding/gob"
	"encoding/json"
	"time"
	"github.com/twinj/uuid"
	log "github.com/sirupsen/logrus"
)
type APIResponse struct {
	Message string `json:"message"`
	Success bool   `json:"success"`
}
type Note struct {
	Autosave  bool   `json:"autosave"`
	Content   string `json:"content"`
	Created   string `json:"created"`
	Encrypted bool   `json:"encrypted"`
	Password  string `json:"password"`
	Subject   string `json:"subject"`
	Tags      string `json:"tags"`
	UID       string `json:"uid"`
	Updated   string `json:"updated"`
	AheadOfPrimary bool      `json:"ahead_of_primary"`
	Deleted        bool      `json:"deleted"`
	Time           time.Time `json:"time"`
	CipherType    string `json:"-"`
	SecondaryPath string `json:"-"`
}
type Notes []Note