summaryrefslogtreecommitdiff
path: root/flat.go
diff options
context:
space:
mode:
Diffstat (limited to 'flat.go')
-rw-r--r--flat.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/flat.go b/flat.go
new file mode 100644
index 0000000..a655856
--- /dev/null
+++ b/flat.go
@@ -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)
+}