stringer

package
v0.0.0-...-3d4fdec Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package stringer stringer(https://github.com/golang/tools/tree/master/cmd/stringer) example

Index

Constants

View Source
const (
	SuccessMap = 1 // success
	FailMap    = 2 // fail
	UnknowMap  = 3 // unknow
)

Variables

View Source
var CodeMap = map[int]string{
	SuccessMap: "success",
	FailMap:    "fail",
	UnknowMap:  "unknow",
}

Functions

func GetMessageByCode

func GetMessageByCode(c int) string

Types

type Enum

type Enum uint
const (
	Success Enum = iota + 1 // success
	Fail                    // fail
	Unknow                  // unknow
)

func (Enum) String

func (i Enum) String() string

Jump to

Keyboard shortcuts

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