forge

package
v1.4.0-postgres-hotfix Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: LGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const MaxProjectNameLen = 50

Variables

View Source
var BaseCmd = &cobra.Command{
	Use:   "forge",
	Short: "Forge is a tool for managing World Forge projects",
	RunE: func(cmd *cobra.Command, _ []string) error {
		if !checkLogin() {
			return nil
		}

		globalConfig, err := globalconfig.GetGlobalConfig()
		if err != nil {
			return eris.Wrap(err, "Failed to get user")
		}

		fmt.Println("✨ World Forge Status ✨")
		fmt.Println("=====================")
		fmt.Println("\n👤 User Information")
		fmt.Println("------------------")
		fmt.Printf("ID:   %s\n", globalConfig.Credential.ID)
		fmt.Printf("Name: %s\n", globalConfig.Credential.Name)

		err = showOrganizationList(cmd.Context())
		if err != nil {
			return eris.Wrap(err, "Failed to show organization list")
		}

		err = showProjectList(cmd.Context())
		if err != nil {
			return eris.Wrap(err, "Failed to show project list")
		}

		fmt.Println("\n================================================")

		return nil
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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