fvmgo

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Copyright © 2019-2020 befovy <befovy@gmail.com>

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.

Copyright © 2019 befovy <befovy@gmail.com>

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.

Copyright © 2019 befovy <befovy@gmail.com>

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.

Copyright © 2019 befovy <befovy@gmail.com>

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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckIfGitExists

func CheckIfGitExists() error

CheckIfGitExists checks if git command is available

func CopyDir added in v0.4.0

func CopyDir(src string, dst string) (err error)

CopyDir recursively copies a directory tree, attempting to preserve permissions. Source directory must exist, destination directory must *not* exist. Symlinks are ignored and skipped.

func CopyFile added in v0.4.0

func CopyFile(src, dst string) (err error)

CopyFile copies the contents of the file named src to the file named by dst. The file will be created if it does not already exist. If the destination file exists, all it's contents will be replaced by the contents of the source file. The file mode will be copied from the source and the copied data is synced/flushed to stable storage.

func CurrentVersion

func CurrentVersion() (string, error)

func Errorf

func Errorf(part string, parts ...interface{})

Errorf print a error with formatting (red)

func FlutterChannelClone

func FlutterChannelClone(channel string) error

func FlutterChannels

func FlutterChannels() []string

FlutterChannels returns All valid flutter channels as string array

func FlutterDir added in v0.6.0

func FlutterDir() string

func FlutterListAllSdks

func FlutterListAllSdks() []string

func FlutterListInstalledSdks

func FlutterListInstalledSdks() []string

func FlutterOutOfFvm added in v0.4.0

func FlutterOutOfFvm(install string) []string

func FlutterRepoClone added in v0.7.0

func FlutterRepoClone(version string, repo string) error

func FlutterSdkRemove

func FlutterSdkRemove(version string)

func FlutterVersionClone

func FlutterVersionClone(version string) error

func FvmHome

func FvmHome() string

/ return fvm home path / check fvm home is valid / or create new fvm home directory

func Infof

func Infof(part string, parts ...interface{})

Infof print a information with formatting (green)

func IsCurrentVersion

func IsCurrentVersion(version string) bool

func IsDirectory

func IsDirectory(name string) bool

IsDirectory check if path exists and is a directory

func IsEmptyDir added in v0.3.1

func IsEmptyDir(name string) (bool, error)

IsEmptyDir check if path exists and is a empty directory

func IsExecutable added in v0.4.0

func IsExecutable(name string) bool

IsExecutable return true if path exists and executable

func IsFileExists

func IsFileExists(name string) bool

IsFileExists checks if a file exists and is not a directory

func IsNotFound

func IsNotFound(name string) bool

IsNotFound return true if path not exists

func IsSymlink(name string) bool

IsSymlink check if path exists and is a symlink

func IsValidFlutterChannel

func IsValidFlutterChannel(channel string) bool

IsValidFlutterChannel return true if it's a valid Flutter channel

func IsValidFlutterInstall

func IsValidFlutterInstall(version string) bool

func IsValidFlutterVersion

func IsValidFlutterVersion(version string) bool

IsValidFlutterVersion return true if it's a valid Flutter version\tag

func LinkGlobalFlutter

func LinkGlobalFlutter(version string)

func LinkProjectFlutter

func LinkProjectFlutter(version string)

func LogColorize added in v0.2.2

func LogColorize()

Colorize chnage the logger to support colors printing.

func LogVerbose added in v0.2.2

func LogVerbose()

func Printf

func Printf(part string, parts ...interface{})

Printf print a message with formatting

func ProcessRunner

func ProcessRunner(cmd string, dir string, arg ...string) error

func ProcessRunnerWithOutput added in v0.8.0

func ProcessRunnerWithOutput(cmd string, dir string, arg ...string) ([]byte, error)

func TempDir

func TempDir() string

/ return temp dir / if not exits, dir will be created / else this call exit(1)

func Verbosef added in v0.2.2

func Verbosef(part string, parts ...interface{})

Verbosef print a verbose level information with formatting (cyan)

func VersionsDir

func VersionsDir() string

/ return versions dir / if not exits, dir will be created / else this call exit(1)

func Warnf

func Warnf(part string, parts ...interface{})

Warnf print a warning with formatting (yellow)

func WorkingDir

func WorkingDir() string

/ return current working dir / this call exit(1) if failed

func YellowV added in v0.2.2

func YellowV(part string, parts ...interface{}) interface{}

Types

This section is empty.

Jump to

Keyboard shortcuts

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