utils

package
v0.0.0-...-b207433 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFile

func CreateFile(fileName string) (*os.File, error)

func IsCallTo

func IsCallTo(call *ssa.Function, names ...string) bool

func OpenFile

func OpenFile(fileName string) (*os.File, error)

func ReadFile

func ReadFile(filePath string) ([]byte, error)

func ReadLineByNumber

func ReadLineByNumber(filePath string, lineNumber int) (string, error)

func UpdateFile

func UpdateFile(t *testing.T, path string, data []byte)

func WriteFile

func WriteFile(f *os.File, text []byte) error

Types

type Counter

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

func NewCounter

func NewCounter() *Counter

func (*Counter) GetNext

func (c *Counter) GetNext() int

type DoubleKeyMap

type DoubleKeyMap map[uint32]struct{}

func NewDoubleKeyMap

func NewDoubleKeyMap() DoubleKeyMap

func (DoubleKeyMap) Add

func (m DoubleKeyMap) Add(posA token.Pos, posB token.Pos)

func (DoubleKeyMap) IsExist

func (m DoubleKeyMap) IsExist(posA token.Pos, posB token.Pos) bool

type IntSet

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

func (*IntSet) Add

func (s *IntSet) Add(num int) bool

func (*IntSet) Exist

func (s *IntSet) Exist(num int) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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