testobject

package
v0.59.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package testobject 用于 text 测试对象

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TextObject

type TextObject struct {
	Name string
	Age  int
}

TextObject 本质是实现了 encoding.TextMarshaler 和 encoding.TextUnmarshaler 接口的实例

func (*TextObject) MarshalText

func (o *TextObject) MarshalText() ([]byte, error)

MarshalText 实现 encoding.TextMarshaler 接口

func (*TextObject) UnmarshalText

func (o *TextObject) UnmarshalText(data []byte) error

UnmarshalText 实现 encoding.TextUnmarshaler 接口

Jump to

Keyboard shortcuts

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