cmd

package
v0.0.0-...-d188b6e Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Copyright © 2021 Joshua Rodstein joshuarodstein@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 © 2020 NAME HERE <EMAIL ADDRESS>

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 © 2020 NAME HERE <EMAIL ADDRESS>

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

View Source
const (
	// grout ASCII Banner and Sub title
	GROUT      = "" /* 237-byte string literal not displayed */
	SpellItOUt = "Github Remote Migration Utility"
)
View Source
const (
	Darwin         = "darwin"
	Linux          = "linux"
	Windows        = "windows"
	WindowsSep     = "\\"
	DarwinLinuxSep = "/"

	Yes = "y"
)

Some of these constants are silly, but I like them

Variables

This section is empty.

Functions

func DisplayBundledErrors

func DisplayBundledErrors()

func DisplayBundledErrorsPlan

func DisplayBundledErrorsPlan()

func DisplayBundledErrorsUpdate

func DisplayBundledErrorsUpdate()

func DisplayChangeCount

func DisplayChangeCount(changes ChangeSet)

func DisplayChangeIntention

func DisplayChangeIntention(changes ChangeSet)

func DisplayChangePlanForDirectory

func DisplayChangePlanForDirectory(plan RepoPlan)

func DisplayChangeResult

func DisplayChangeResult(changes ChangeSet)

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func IAmGrout

func IAmGrout()

func ParametersConfirmationOutput

func ParametersConfirmationOutput() string

func UrlSplit

func UrlSplit(r rune) bool

Types

type ChangeSet

type ChangeSet struct {
	Count int        `json:"count"`
	Plans []RepoPlan `json:"plans"`
}

type ErrorBundle

type ErrorBundle struct {
	Count  int
	Errors []error
}

Structs to aid in mapping, planning, and executing changes

type LocalRepository

type LocalRepository struct {
	Name    string   `json:"name"`
	Path    string   `json:"path"`
	Remotes []Remote `json:"remotes"`
}

type Remote

type Remote struct {
	Name string   `json:"name"`
	URLs []string `json:"urls"`
}

type RemoteChange

type RemoteChange struct {
	Name         string   `json:"name"`
	Organization string   `json:"newOrganization"`
	CurrentURLs  []string `json:"current_urls"`
	NewURLs      []string `json:"new_urls"`
}

Change structs represent changes to a repo's remotes

type RepoMap

type RepoMap struct {
	Meta  map[string]string `json:"meta"`
	Repos []LocalRepository `json:"repos"`
}

type RepoPlan

type RepoPlan struct {
	Repo       LocalRepository `json:"repo"`
	Changes    []RemoteChange  `json:"changes"`
	HasChanges bool            `json:"has_changes"`
}

type SplitUrl

type SplitUrl struct {
	Type    string
	BaseURL string
	Org     string
	Repo    string
}

Jump to

Keyboard shortcuts

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