utils

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadJava added in v1.0.0

func DownloadJava(version int, cliCtx *cli.Context) (string, error)

func ExtractTarGz added in v1.2.0

func ExtractTarGz(gzipStream io.Reader, extractPath string)

func GetArch added in v1.0.0

func GetArch() string

func GetServerFolder added in v1.0.0

func GetServerFolder(path string, cCtx *cli.Context) string

func GetSha256Hash added in v0.2.0

func GetSha256Hash(filePath string) (string, error)

func GetStartScript added in v1.1.1

func GetStartScript(path string) string

func InstallJava added in v1.0.0

func InstallJava(javaPath string, cliCtx *cli.Context) error

func MCVersionToJavaMajor added in v0.2.0

func MCVersionToJavaMajor(mcVersion string) (int, error)

func PrintOSWarnings added in v1.0.0

func PrintOSWarnings()

func RunCommandAndPipeAllSTD added in v1.1.1

func RunCommandAndPipeAllSTD(cmd *exec.Cmd, noPrefix bool) error

func RunCommandAndPipeOutput added in v1.0.0

func RunCommandAndPipeOutput(cmd *exec.Cmd) error

func WriteStartScript added in v1.0.0

func WriteStartScript(path string, ramAmount int, cliCtx *cli.Context) error

Types

type JavaVersion

type JavaVersion struct {
	Version string
	Major   int
	Minor   int
}

func GetJavaVersion

func GetJavaVersion() (JavaVersion, error)

Jump to

Keyboard shortcuts

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