diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..774451c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+clock.svg
+gobytest
diff --git a/main.go b/main.go
index 5aaaa7e..542bc44 100644
--- a/main.go
+++ b/main.go
@@ -1,14 +1,46 @@
package main
import (
- "gobytest/countdown"
+ "fmt"
+ "gobytest/clockface"
+ "io"
"os"
"time"
)
func main() {
// greet.Greet(os.Stdout, "Elodie")
- sleeper := countdown.NewConfigurableSleeper(1*time.Second, time.Sleep)
+ // sleeper := countdown.NewConfigurableSleeper(1*time.Second, time.Sleep)
- countdown.Countdown(os.Stdout, sleeper)
+ // countdown
+ // countdown.Countdown(os.Stdout, sleeper)
+
+ // clockface
+ t := time.Now()
+
+ sh := clockface.SecondHand(t)
+ io.WriteString(os.Stdout, svgStart)
+ io.WriteString(os.Stdout, bezel)
+ io.WriteString(os.Stdout, secondHandTag(sh))
+ io.WriteString(os.Stdout, svgEnd)
}
+
+func secondHandTag(p clockface.Point) string {
+ return fmt.Sprintf(
+ ``,
+ p.X,
+ p.Y,
+ )
+}
+
+const svgStart = `
+
+`