util

package
v1.29.0-alpha.144 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package util xxx

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExeCommand

func ExeCommand(command string) (string, bool)

ExeCommand execute shell command, command like: haproxy -f config.cfg -c haproxy -f haproxy.cfg -p haproxy.pid -sf $(cat haproxy.pid)

func GetSubsection

func GetSubsection(first, second []string) (sub []string)

GetSubsection return slice come from first - second

func GetValidTargetGroupSub

func GetValidTargetGroupSub(src string) string

GetValidTargetGroupSub 去除/等特殊字符,/转换为-,targetGroup名字特殊字符只能是-

func GetValidZookeeperPath

func GetValidZookeeperPath(src string) string

GetValidZookeeperPath 去除/等特殊字符,/转换为_

func Md5SumForFile

func Md5SumForFile(filename string) (string, error)

Md5SumForFile calculate md5sum of file

func ReplaceFile

func ReplaceFile(oldFile, curFile string) error

ReplaceFile xxx

func TrimSpecialChar

func TrimSpecialChar(src string) string

TrimSpecialChar trim special char

Types

This section is empty.

Jump to

Keyboard shortcuts

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