const1

package
v1.24.1 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 0 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const CheckSum = "2846f8c864938c44581190cba8e2968c960fd37cd26e511beba22fb1859eca31"

Variables

View Source
var AnimalMap map[Animal]*AnimalMetaData
View Source
var Animals = AnimalMetaDataList{
	{
		ID:   AnimalDog,
		Name: "犬",
	},
	{
		ID:   AnimalCat,
		Name: "猫",
	},
}
View Source
var ExtendsTestMap map[ExtendsTest]*ExtendsTestMetaData
View Source
var ExtendsTests = ExtendsTestMetaDataList{
	{
		ID:               ExtendsTestV1,
		Name:             "value test 1",
		IntValue:         1,
		IntSliceValue:    []int{1, -2},
		Int64Value:       9223372036854775807,
		Int64SliceValue:  []int64{9223372036854775807, 1},
		FloatValue:       1.5,
		FloatSliceValue:  []float64{1, 2.5, -2},
		StringValue:      "string",
		StringSliceValue: []string{"a", "b", "c"},
	},
}
View Source
var TypeTestMap map[TypeTest]*TypeTestMetaData

Functions

This section is empty.

Types

type Animal

type Animal string

Animal ... 動物

const (
	AnimalDog Animal = "dog"
	AnimalCat Animal = "cat"
)

func (Animal) Meta

func (c Animal) Meta() (*AnimalMetaData, bool)

func (Animal) Name

func (c Animal) Name() string

func (Animal) String

func (c Animal) String() string

type AnimalMetaData

type AnimalMetaData ConstantMetaData[Animal]

type AnimalMetaDataList added in v1.23.0

type AnimalMetaDataList []*AnimalMetaData

type ConstantMetaData

type ConstantMetaData[T comparable] struct {
	ID   T      `json:"id"`
	Name string `json:"name"`
}

type Constants

type Constants struct {
	Animals      AnimalMetaDataList                   `json:"animals"`
	Animal       map[Animal]*AnimalMetaData           `json:"animal"`
	ExtendsTests ExtendsTestMetaDataList              `json:"extends_tests"`
	ExtendsTest  map[ExtendsTest]*ExtendsTestMetaData `json:"extends_test"`
	TypeTests    TypeTestMetaDataList                 `json:"type_tests"`
	TypeTest     map[TypeTest]*TypeTestMetaData       `json:"type_test"`
}
var ConstantsData *Constants

func (*Constants) ConstIDs

func (c *Constants) ConstIDs() [][]any

func (*Constants) GetConstIDs

func (c *Constants) GetConstIDs() [][]any

deprecated use ConstIDs

type ExtendsTest

type ExtendsTest string

ExtendsTest ... extends のテスト

const (
	ExtendsTestV1 ExtendsTest = "v1"
)

func (ExtendsTest) Meta

func (c ExtendsTest) Meta() (*ExtendsTestMetaData, bool)

func (ExtendsTest) Name

func (c ExtendsTest) Name() string

func (ExtendsTest) String

func (c ExtendsTest) String() string

type ExtendsTestMetaData

type ExtendsTestMetaData struct {
	ID               ExtendsTest `json:"id"`
	Name             string      `json:"name"`
	IntValue         int         `json:"int_value"`
	IntSliceValue    []int       `json:"int_slice_value"`
	Int64Value       int64       `json:"int64_value"`
	Int64SliceValue  []int64     `json:"int64_slice_value"`
	FloatValue       float64     `json:"float_value"`
	FloatSliceValue  []float64   `json:"float_slice_value"`
	StringValue      string      `json:"string_value"`
	StringSliceValue []string    `json:"string_slice_value"`
}

type ExtendsTestMetaDataList added in v1.23.0

type ExtendsTestMetaDataList []*ExtendsTestMetaData

type TypeTest

type TypeTest string

TypeTest ... set other type test

const (
	TypeTestV1 TypeTest = "v1"
)

func (TypeTest) Meta

func (c TypeTest) Meta() (*TypeTestMetaData, bool)

func (TypeTest) Name

func (c TypeTest) Name() string

func (TypeTest) String

func (c TypeTest) String() string

type TypeTestMetaData

type TypeTestMetaData struct {
	ID          TypeTest    `json:"id"`
	Name        string      `json:"name"`
	Animals     []Animal    `json:"animals"`
	ExtendsTest ExtendsTest `json:"extends_test"`
}

type TypeTestMetaDataList added in v1.23.0

type TypeTestMetaDataList []*TypeTestMetaData

Jump to

Keyboard shortcuts

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