File: hello-world.go

package info (click to toggle)
emacs-lsp-docker 1.0.0%2Bgit20250423.ff41f4a-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 348 kB
  • sloc: lisp: 705; sh: 50; makefile: 24; cpp: 19; javascript: 13; python: 10
file content (16 lines) | stat: -rw-r--r-- 210 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package main

import "fmt"

type Greeter struct {
	Greeting string
}

func (g Greeter) SayHello() {
	fmt.Println(g.Greeting, "world")
}

func main() {
	greeter := Greeter{Greeting: "Ola"}
	greeter.SayHello()
}