_content/talks: add talks.golang.org content
Copied from golang.org/x/talks/content at a07c284b (Feb 8 2021)
and from golang.org/x/tools/cmd/present/static and templates
at 43b469a3 (Nov 17 2021).
Adds 80MB (uncompressed) to the repository and the
cmd/golangorg binary.
Change-Id: I4949e41bf6f3ccc28ea13303d79ed6931abe86e7
Reviewed-on: https://go-review.googlesource.com/c/website/+/365135
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
diff --git a/_content/talks/2012/goforc/celsius.go b/_content/talks/2012/goforc/celsius.go
new file mode 100644
index 0000000..ffb4572
--- /dev/null
+++ b/_content/talks/2012/goforc/celsius.go
@@ -0,0 +1,19 @@
+// +build ignore,OMIT
+
+package main
+
+import "fmt"
+
+type Celsius float32
+type Fahrenheit float32
+
+func (t Celsius) String() string { return fmt.Sprintf("%g°C", t) }
+func (t Fahrenheit) String() string { return fmt.Sprintf("%g°F", t) }
+func (t Celsius) ToFahrenheit() Fahrenheit { return Fahrenheit(t*9/5 + 32) }
+
+func main() {
+ var t Celsius = 21
+ fmt.Println(t.String())
+ fmt.Println(t)
+ fmt.Println(t.ToFahrenheit())
+}