Website Summary Files Commits Branches @commit @diff @stats
path: root / homework / 81319 / golang2html_code_fold / input.go
diff options
context:
space:
mode:
1 files changed, 21 insertions, 0 deletions
-rw-r--r--homework/81319/golang2html_code_fold/input.go21
diff --git a/homework/81319/golang2html_code_fold/input.go b/homework/81319/golang2html_code_fold/input.go
new file mode 100644
index 0000000..0a31497
--- /dev/null
+++ b/homework/81319/golang2html_code_fold/input.go
@@ -0,0 +1,21 @@
+package main
+
+import (
+ "fmt"
+)
+
+type HelloWorlder struct {
+ message string
+}
+
+func (hw *HelloWorlder) greet() {
+ fmt.Println(hw.message)
+}
+
+func main() {
+ helloWorlder := &HelloWorlder{
+ message: "Hello, world!",
+ }
+
+ helloWorlder.greet()
+} \ No newline at end of file