utils

package
v2.7.3 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

  • Copyright (c) 2017, The Easegress Authors
  • All rights reserved. *
  • Licensed under the Apache License, Version 2.0 (the "License");
  • you may not use this file except in compliance with the License.
  • You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software
  • distributed under the License is distributed on an "AS IS" BASIS,
  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  • See the License for the specific language governing permissions and
  • limitations under the License.

Package utils contains the utilities.

Index

Constants

View Source
const (
	// EnvWhichGo is the environment variable name of which go.
	EnvWhichGo = "EGBUILDER_GO"

	EGPath = "github.com/megaease/easegress/v2"
)

Variables

View Source
var CreateExample = general.CreateExample
View Source
var CreateMultiExample = general.CreateMultiExample
View Source
var ExitWithError = general.ExitWithError
View Source
var ExitWithErrorf = general.ExitWithErrorf

Functions

func ExportableVariableName

func ExportableVariableName(name string) bool

func GetGo

func GetGo() string

GetGo returns which go to use.

func NewExecCmd

func NewExecCmd(ctx context.Context, name string, args ...string) *exec.Cmd

func ValidVariableName

func ValidVariableName(name string) bool

func WithInterrupt

func WithInterrupt(parent context.Context) (context.Context, context.CancelFunc)

Types

type Example

type Example = general.Example

Jump to

Keyboard shortcuts

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