Skip to content

Instantly share code, notes, and snippets.

@mrkaspa
Created August 27, 2016 16:03
Show Gist options
  • Save mrkaspa/b634754ad86619199574ce620600caba to your computer and use it in GitHub Desktop.
Save mrkaspa/b634754ad86619199574ce620600caba to your computer and use it in GitHub Desktop.
package models
type mockPersistor struct {
}
func NewMockPersistor() Persistance {
return mockPersistor{}
}
func (p mockPersistor) PersistAndFind(sn StrokeNear) ([]Stroke, error) {
return []Stroke{
{
UserID: "a2",
Info: "a2",
Location: []float64{-79.38066843, 43.65483486},
},
}, nil
}
func (p mockPersistor) Persist(s Stroke) error {
return nil
}
func (p mockPersistor) FindStrokes(username string) ([]Stroke, error) {
return []Stroke{
{
UserID: "a1",
Info: "a1",
Location: []float64{-79.38066843, 43.65483486},
},
}, nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment