sys

package
v0.0.0-...-96c3957 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetExecutableName

func GetExecutableName() (string, error)

GetExecutableName 返回当前执行文件的名称

func GetLatestTag

func GetLatestTag(repo string) (string, error)

func GetPublicIP

func GetPublicIP() (string, error)

func KillProcess

func KillProcess(config config.Config) error

func RestartApplication

func RestartApplication()

RestartApplication 封装了应用程序的重启逻辑

func RestartService

func RestartService(config config.Config)

linux

func RunViaBatch

func RunViaBatch(config config.Config, exepath string, args []string) error

RunViaBatch 函数接受配置,程序路径和参数数组

func SetTitle

func SetTitle(title string)

SetTitle sets the window title to "gensokyo-kook © 2023 - [Year] Hoshinonyaruko".

Types

type Restarter

type Restarter interface {
	Restart(executableName string) error
}

Restarter is the interface that wraps the Restart method.

type Tag

type Tag struct {
	Name string `json:"name"`
}

type UnixRestarter

type UnixRestarter struct{}

UnixRestarter implements the Restarter interface for Unix-like systems.

func NewRestarter

func NewRestarter() *UnixRestarter

NewRestarter creates a new Restarter appropriate for Unix-like systems.

func (*UnixRestarter) Restart

func (r *UnixRestarter) Restart(executableName string) error

Restart restarts the application on Unix-like systems.

Jump to

Keyboard shortcuts

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