Help us shape the future of Go! Take the 2026 Go Developer Survey

test

package
v3.1.17 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNormalPageCompleted

func IsNormalPageCompleted(s string) bool

func MockVariableValue

func MockVariableValue[T any](p *T, v ...T) (reset func())

func ParseJSONError

func ParseJSONError(buf []byte) (ret struct {
	ErrorMessage string `json:"errorMessage"`
	RenderFormat string `json:"renderFormat"`
},
)

func RedirectURL

func RedirectURL(resp http.ResponseWriter) string

RedirectURL returns the redirect URL of a http response. It also works for JSONRedirect: `{"redirect": "..."}` FIXME: it should separate the logic of checking from header and JSON body

func SetupGiteaRoot

func SetupGiteaRoot() string

SetupGiteaRoot Sets GITEA_ROOT if it is not already set and returns the value

Types

type LogChecker

type LogChecker struct {
	*log.EventWriterBaseImpl
	// contains filtered or unexported fields
}

func NewLogChecker

func NewLogChecker(namePrefix string) (logChecker *LogChecker, cancel func())

func (*LogChecker) Check

func (lc *LogChecker) Check(d time.Duration) (filtered []bool, stopped bool)

Check returns the filtered slice and whether the stop mark is reached.

func (*LogChecker) Filter

func (lc *LogChecker) Filter(msgs ...string) *LogChecker

Filter will make the `Check` function to check if these logs are outputted.

func (*LogChecker) Run

func (lc *LogChecker) Run(ctx context.Context)

func (*LogChecker) StopMark

func (lc *LogChecker) StopMark(msg string) *LogChecker

Source Files

  • logchecker.go
  • utils.go

Jump to

Keyboard shortcuts

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