Website Summary Files Commits Branches @commit @diff @stats
path: root / homework / 81319 / golang2html_code_fold / input.go
blob: 0a31497889c62887277f5ccf3479a44dd57e6852 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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()
}