cmd

package
v0.0.0-...-9764144 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2021 License: MIT Imports: 17 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/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
y or Y : Canonical URL