mk

package
v0.218.2 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New[T any]() *T
Example
package main

import (
	"go.llib.dev/frameless/pkg/mk"
)

func main() {
	v := mk.New[TypeWithInit]()

	_ = v
}

type TypeWithInit struct {
	V1  string
	V2  string
	Foo string
	Bar int
	Baz bool
}

func (v *TypeWithInit) Init() {
	v.V1 = "V1i"
	v.V2 = "V2i"
}

func ReflectNew

func ReflectNew(typ reflect.Type) reflect.Value

Types

This section is empty.

Jump to

Keyboard shortcuts

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