names

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExportName

func ExportName(name string) string

Only Make it Public,no turn to other camel method

func GoName

func GoName(name string, trimPrefixes []string, inCurPkg bool) string

func HeaderFileToGo

func HeaderFileToGo(incPath string) string

/path/to/foo.h -> foo.go /path/to/_intptr.h -> X_intptr.go

func PubName

func PubName(name string) string

func ToCamelCase

func ToCamelCase(s string, firstPartUpper bool) string

func UpperFirst

func UpperFirst(name string) string

Types

type NameMapper

type NameMapper struct {
	// contains filtered or unexported fields
}

NameMapper handles name mapping and uniqueness for Go symbols

func NewNameMapper

func NewNameMapper() *NameMapper

func (*NameMapper) GetUniqueGoName

func (m *NameMapper) GetUniqueGoName(name string, trimPrefixes []string, toCamel bool) (string, bool)

returns a unique Go name for an original name For every go name, it will be unique.

func (*NameMapper) SetMapping

func (m *NameMapper) SetMapping(originName, newName string)

Jump to

Keyboard shortcuts

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