goTour

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs02

func Abs02(v VertexEx22) float64

関数の作成

func Main

func Main()

func WordCount

func WordCount(s string) map[string]int

単語数を数えるメソッド

Types

type F

type F float64

struct 宣言 F 型は float64 を持つ

func (F) M

func (f F) M()

レシーバとして F 型を指定して メソッド M() を実装

type I

type I interface {
	M()
}

インタフェース宣言

type IPAddr

type IPAddr [4]byte

func (IPAddr) String

func (i IPAddr) String() string

type I_Ex24

type I_Ex24 interface {
	M()
}

インタフェース宣言

type MyError

type MyError struct {
	When time.Time
	What string
}

func (*MyError) Error

func (e *MyError) Error() string

type SafeCounter

type SafeCounter struct {
	// contains filtered or unexported fields
}

SafeCounter 型は排他制御ができて key の数を保持する

func (*SafeCounter) Inc

func (c *SafeCounter) Inc(key string)

Inc メソッドは指定された key のカウンタを増やす

func (*SafeCounter) Value

func (c *SafeCounter) Value(key string) int

Value メソッドは指定された key のカウンタ値を返す

type T

type T struct {
	S string
}

struct 宣言 T 型は string を持つ

func (*T) M

func (t *T) M()

レシーバとして *T 型を指定して メソッド M() を実装

type T_Ex24

type T_Ex24 struct {
	S string
}

struct 宣言 T_Ex24 型は string を持つ

func (*T_Ex24) M

func (t *T_Ex24) M()

レシーバとして *T_Ex24 型を指定して メソッド M() を実装

type Vertex

type Vertex struct {
	X int
	Y int
}

type Vertex2

type Vertex2 struct {
	X int
	Y int
	Z int
}

type VertexEx16

type VertexEx16 struct {
	// contains filtered or unexported fields
}

type VertexEx22

type VertexEx22 struct {
	X, Y float64
}

func (VertexEx22) Abs01

func (v VertexEx22) Abs01() float64

メソッドの作成 Abs01 メソッドは v という名前の VertexEx22 型のレシーバを持つ。型は任意。

func (*VertexEx22) Scale

func (v *VertexEx22) Scale(f float64)

レシーバをポインタした書き方

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL