gobutil

package
v0.0.0-...-4b52996 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeepCopy

func DeepCopy(dst, src any) error

DeepCopy clone object. can clone without same type

Example:

type Foo struct {
    Name string
    Value int
}

type Bar struct {
    Name string
    Value int
}

foo := &Foo { "Jason", 100}
var bar Bar
DeepCopy(&bar, foo)
fmt.Printf("%+v\n", bar)

func ReadFile

func ReadFile(filename string, e any) error

ReadFile read struct from gob stream file

func WriteFile

func WriteFile(filename string, e any) error

WriteFile write struct to gob stream file

Types

This section is empty.

Jump to

Keyboard shortcuts

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