types

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: MIT Imports: 3 Imported by: 0

README

サンプルリスト

このディレクトリには以下のサンプルがあります。

file example name note
type01.go types_basic type についてのサンプルです
define_types_easy.go types_define_types_easy Goでは型定義が簡単であるということを示すサンプルです

Documentation

Overview

Package types -- Go言語の 型定義 についてのサンプルが配置されているパッケージです。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Basic

func Basic() error

Basic は、type についてのサンプルです.

func DefineTypesEasy added in v0.2.8

func DefineTypesEasy() error

DefineTypesEasy -- Goでは型定義が簡単であるということを示すサンプルです.

func NewRegister

func NewRegister() mapping.Register

NewRegister -- このパッケージ用のサンプルを登録する mapping.Register を生成します。

Types

type Id added in v0.2.8

type Id string

ID

type KeyValuePair

type KeyValuePair struct {
	Key   string
	Value interface{}
}

KeyValuePair -- 構造体の定義も struct で定義した内容を type で名前定義しているのと同じ

func NewKeyValuePair

func NewKeyValuePair(k string, v string) *KeyValuePair

NewKeyValuePair -- *KeyValuePair を生成

type MyInt1

type MyInt1 int

MyInt1 -- int に対して別名を定義

type MyInt2

type MyInt2 int

MyInt2 -- int に対して別名を定義

type MyIntArray

type MyIntArray [3]int

MyIntArray -- 配列に対して別名を定義

type Name added in v0.2.8

type Name string

名前

type User added in v0.2.8

type User struct {
	Id   Id
	Name Name
}

ユーザ

func (User) String added in v0.2.8

func (me User) String() string

Jump to

Keyboard shortcuts

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