funcfile

package
v0.0.0-...-841f19b Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallDoString

func CallDoString()

无参数无返回值:打印 go go go!

func CallLuaFunc1

func CallLuaFunc1()

无结果返回:打印 Hello

func CallLuaFunc2

func CallLuaFunc2()

单结果返回:加法运算

func CallLuaFunc3

func CallLuaFunc3()

table 数据获取:获取配置信息

func CallLuaFunc4

func CallLuaFunc4()

多结果返回: 除法运算,获取商和余数

func CheckErr

func CheckErr(err error)

func GoAdd

func GoAdd(L *lua.LState) int

lua 的回调函数

func RunFuncName

func RunFuncName()

func RunLuaCallback

func RunLuaCallback()

lua 回调 Go 函数

func RunMyTime

func RunMyTime()
Example
RunSayHello()
Output:

[hello world]

func RunReflect

func RunReflect()

func RunSayHello

func RunSayHello()

func RunSlice

func RunSlice()

func RunTableMapping

func RunTableMapping()

table 映射的方式获取数据

func RunTemplate

func RunTemplate()

Types

type Address

type Address struct {
	City       string
	PostalCode string
}

type Animal

type Animal struct {
}

func (*Animal) Eat

func (m *Animal) Eat(sth string)

type MsgData

type MsgData struct {
	MsgID     string // 消息ID
	StartTime int64  // 发送消息时间戳 nanoseconds
	EndTime   int64  // 接到返回消息时间戳 nanoseconds
	Sus       bool   // 运行结果
	Fn        bool   // 是否完成
}

用于缓存消息收发记录

type MsgDataManager

type MsgDataManager struct {
	Datas []*MsgData
	// contains filtered or unexported fields
}

func (*MsgDataManager) RecvMsg

func (m *MsgDataManager) RecvMsg(msg *string, sus bool)

func (*MsgDataManager) SendMsg

func (m *MsgDataManager) SendMsg(msg *string)

type Person

type Person struct {
	Name    string
	Age     int
	Address Address
	Hobbies []string
}

Jump to

Keyboard shortcuts

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