projutil

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2018 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	GopathEnv = "GOPATH"
)
View Source
const (
	SrcDir = "src"
)

Variables

This section is empty.

Functions

func CheckAndGetCurrPkg

func CheckAndGetCurrPkg() string

CheckAndGetCurrPkg checks if this project's repository path is rooted under $GOPATH and returns the current directory's import path e.g: "github.com/example-inc/app-operator"

func MustGetwd

func MustGetwd() string

func MustInProjectRoot

func MustInProjectRoot()

MustInProjectRoot checks if the current dir is the project root and returns the current repo's import path e.g github.com/example-inc/app-operator

Types

type OperatorType

type OperatorType = string

OperatorType - the type of operator

const (
	// OperatorTypeGo - golang type of operator.
	OperatorTypeGo OperatorType = "go"
	// OperatorTypeAnsible - ansible type of operator.
	OperatorTypeAnsible OperatorType = "ansible"
)

func GetOperatorType

func GetOperatorType() OperatorType

GetOperatorType returns type of operator is in cwd This function should be called after verifying the user is in project root e.g: "go", "ansible"

Jump to

Keyboard shortcuts

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