product

package
v4.2.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: MPL-2.0 Imports: 6 Imported by: 38

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisplayName

func DisplayName() string

Name returns the name of the product

func LoginCmd

func LoginCmd() string

LoginCmd returns the login command for the product

func Name

func Name() licenseapi.ProductName

func Replace

func Replace(content string) string

Replace replaces the product name in the given usage string based on the current product.Product().

It replaces "loft" with the specific product name:

  • "devpod pro" for product.DevPodPro
  • "vcluster platform" for product.VClusterPro
  • No replacement for product.Loft

This handles case insensitive replaces like "loft" -> "devpod pro".

It also handles case sensitive replaces:

  • "Loft" -> "DevPod.Pro" for product.DevPodPro
  • "Loft" -> "vCluster Platform" for product.VClusterPro

This allows customizing command usage text for different products.

Parameters:

  • content: The string to update

Returns:

  • The updated string with product name replaced if needed.

func ReplaceWithHeader

func ReplaceWithHeader(use, content string) string

ReplaceWithHeader replaces the "loft" product name in the given usage string with the specific product name based on product.Product(). It also adds a header with padding around the product name and usage.

The product name replacements are:

  • "devpod pro" for product.DevPodPro
  • "vcluster platform" for product.VClusterPro
  • No replacement for product.Loft

This handles case insensitive replaces like "loft" -> "devpod pro".

It also handles case sensitive replaces:

  • "Loft" -> "DevPod.Pro" for product.DevPodPro
  • "Loft" -> "vCluster Platform" for product.VClusterPro

Parameters:

  • use: The usage string
  • content: The content string to run product name replacement on

Returns:

  • The content string with product name replaced and header added

func ResetPassword

func ResetPassword() string

ResetPassword returns the reset password command for the product

func StartCmd

func StartCmd() string

StartCmd returns the start command for the product

func Url

func Url() string

Url returns the url command for the product

Types

This section is empty.

Jump to

Keyboard shortcuts

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