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 ¶
- func CheckIfGitExists() error
- func CopyDir(src string, dst string) (err error)
- func CopyFile(src, dst string) (err error)
- func CurrentVersion() (string, error)
- func Errorf(part string, parts ...interface{})
- func FlutterChannelClone(channel string) error
- func FlutterChannels() []string
- func FlutterDir() string
- func FlutterListAllSdks() []string
- func FlutterListInstalledSdks() []string
- func FlutterOutOfFvm(install string) []string
- func FlutterRepoClone(version string, repo string) error
- func FlutterSdkRemove(version string)
- func FlutterVersionClone(version string) error
- func FvmHome() string
- func Infof(part string, parts ...interface{})
- func IsCurrentVersion(version string) bool
- func IsDirectory(name string) bool
- func IsEmptyDir(name string) (bool, error)
- func IsExecutable(name string) bool
- func IsFileExists(name string) bool
- func IsNotFound(name string) bool
- func IsSymlink(name string) bool
- func IsValidFlutterChannel(channel string) bool
- func IsValidFlutterInstall(version string) bool
- func IsValidFlutterVersion(version string) bool
- func LinkGlobalFlutter(version string)
- func LinkProjectFlutter(version string)
- func LogColorize()
- func LogVerbose()
- func Printf(part string, parts ...interface{})
- func ProcessRunner(cmd string, dir string, arg ...string) error
- func ProcessRunnerWithOutput(cmd string, dir string, arg ...string) ([]byte, error)
- func TempDir() string
- func Verbosef(part string, parts ...interface{})
- func VersionsDir() string
- func Warnf(part string, parts ...interface{})
- func WorkingDir() string
- func YellowV(part string, parts ...interface{}) interface{}
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
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
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 Errorf ¶
func Errorf(part string, parts ...interface{})
Errorf print a error with formatting (red)
func FlutterChannelClone ¶
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 FlutterRepoClone ¶ added in v0.7.0
func FlutterSdkRemove ¶
func FlutterSdkRemove(version string)
func FlutterVersionClone ¶
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 IsDirectory ¶
IsDirectory check if path exists and is a directory
func IsEmptyDir ¶ added in v0.3.1
IsEmptyDir check if path exists and is a empty directory
func IsExecutable ¶ added in v0.4.0
IsExecutable return true if path exists and executable
func IsFileExists ¶
IsFileExists checks if a file exists and is not a directory
func IsValidFlutterChannel ¶
IsValidFlutterChannel return true if it's a valid Flutter channel
func IsValidFlutterInstall ¶
func IsValidFlutterVersion ¶
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 ProcessRunnerWithOutput ¶ added in v0.8.0
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
Types ¶
This section is empty.