diff options
Diffstat (limited to 'flat.go')
-rw-r--r-- | flat.go | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -0,0 +1,19 @@ +package main + +import ( + "cmp" + "fmt" +) + +type flat struct { + ID int + Price string +} + +func (f *flat) URL() string { + return fmt.Sprintf("https://rightmove.co.uk/properties/%v", f.ID) +} + +func compareID(a, b flat) int { + return cmp.Compare(a.ID, b.ID) +} |