cmd

package
Version: v0.0.0-...-3235f3a Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2021 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Copyright © 2021 Harran Ali <harran.m@gmail.com>. All rights reserved. Use of this source code is governed by MIT-style license that can be found in the LICENSE file.

Index

Constants

View Source
const CONFIG_URL string = "https://raw.githubusercontent.com/gincoat/installer/master/gincoat/config.json"

Config file

Variables

This section is empty.

Functions

func Execute

func Execute()

Types

type CmdNew

type CmdNew struct{}

struct for creating new project command

func (*CmdNew) DownloadConfig

func (cn *CmdNew) DownloadConfig(http *http.Client, url string, conf *Config) *Config

Download config

func (*CmdNew) DownloadGincoat

func (cn *CmdNew) DownloadGincoat(http *http.Client, url string, tempName string) string

Download Gincoat archive

func (*CmdNew) GenerateTempName

func (cn *CmdNew) GenerateTempName() string

Generate random name

func (*CmdNew) IsUpdatedRequired

func (cn *CmdNew) IsUpdatedRequired(LatestReleasedVersion string) bool

Check for updates

func (*CmdNew) PrintUpdateRequiredMessage

func (cn *CmdNew) PrintUpdateRequiredMessage()

Print update required message

func (*CmdNew) Unpack

func (cn *CmdNew) Unpack(filePath string, destPath string)

Unpack Gincoat

type Config

type Config struct {
	Releases                 map[string]Release `json:"releases"`
	InstallerReleasedVersion string             `json:"installerReleasedVersion"`
	Paths                    []string           `json:"paths"`
}

type Release

type Release struct {
	Name string `json:"name"`
	Url  string `json:"url"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL