packages

package
v0.0.0-...-15a9a0c Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package packages contains utilities to deal with package names in a robust manner. This will be useful on ensuring our code being robust against package prefix changes.

Index

Constants

View Source
const FrameworkPrefix = "go.chromium.org/tast/core/"

FrameworkPrefix is the newer common framework package prefix.

View Source
const OldFrameworkPrefix = "chromiumos/tast/"

OldFrameworkPrefix is the older common framework package prefix.

Variables

This section is empty.

Functions

func Normalize

func Normalize(s string) string

Normalize normalizes old framework package path to a newer corresponding one. If the given string doesn't start with OldFrameworkPrefix, Normalize returns the unmodified string.

func Same

func Same(x, y string) bool

Same returns true if x and y are identical after normalization.

func SplitFuncName

func SplitFuncName(fn string) (fullPkg, name string)

SplitFuncName splits runtime.Func.Name() into package and function name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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