op

package module
v0.0.0-...-5c53962 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: MIT Imports: 9 Imported by: 0

README

opconst

Test, check, update for each func const op = "func_name"

Documentation

Overview

Package op check in each function first line for operation identification:

const op = "function_name"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Test

func Test(t interface {
	Errorf(format string, args ...any)
	Logf(format string, args ...any)
}, folder string)

Test function for easy create implemetation in project

Types

type Code

type Code int

Code of error

const (
	Undefined Code = iota
	NotFound
	NotSame
)

codes of errors

func (Code) String

func (c Code) String() string

type ErrOp

type ErrOp struct {
	Pos    Position
	Code   Code
	Expect string
}

ErrOp is typical struct of error output

func (ErrOp) Error

func (e ErrOp) Error() string

type Op

type Op struct {
	Pos  Position
	Name string
}

Op is position `const op`

func Get

func Get(filenames string) (ops []Op, err error)

Get return position of `const op` in source code

func (Op) String

func (o Op) String() string

type Position

type Position struct {
	Filename string
	Line     int
}

Position in source code

func (Position) String

func (p Position) String() string

Jump to

Keyboard shortcuts

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