Public Access
chore: rename keystone to draft
Rename the module, CLI command name, and all references from keystone/basalt to draft, and fix the stale build/README content found along the way.
This commit is contained in:
1 parent
8293794d13
commit
d7e4c554d8
16 files changed
+40
-43
No files matched your search
+3
-3
@@ -8,7 +8,7 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"gitea.fernandovideira.com/FernandoJVideira/keystone/assets"
|
||||
"git.fernandovideira.com/FernandoJVideira/draft/assets"
|
||||
"github.com/manifoldco/promptui"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
@@ -19,8 +19,8 @@ func init() {
|
||||
|
||||
var apiCmd = &cobra.Command{
|
||||
Use: "api",
|
||||
Short: "Create a new Keystone API project",
|
||||
Long: `Create a new Keystone API project with the necessary structure and files.`,
|
||||
Short: "Create a new Draft API project",
|
||||
Long: `Create a new Draft API project with the necessary structure and files.`,
|
||||
Run: genProject,
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ func init() {
|
||||
var handlerCmd = &cobra.Command{
|
||||
Use: "handler",
|
||||
Short: "Create a new handler",
|
||||
Long: `Create a new handler for your Keystone project.`,
|
||||
Long: `Create a new handler for your Draft project.`,
|
||||
Run: genHandler,
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ import (
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
"gitea.fernandovideira.com/FernandoJVideira/keystone/assets"
|
||||
"git.fernandovideira.com/FernandoJVideira/draft/assets"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ var defaultSize = 32
|
||||
var keyCmd = &cobra.Command{
|
||||
Use: "key [size]",
|
||||
Short: "Generate a new cryptographic key",
|
||||
Long: `Generate a new cryptographic key for use in Keystone projects.`,
|
||||
Long: `Generate a new cryptographic key for use in Draft projects.`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
var keyLength int
|
||||
if cmd.Flags().Lookup("size").Changed {
|
||||
|
||||
+3
-3
@@ -4,7 +4,7 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
const oldModuleName = "github.com/FernandoJVideira/simple_bank"
|
||||
const oldModuleName = "github.com/FernandoJVideira/api_tmpl"
|
||||
const srcDir = "embedded/api_tmpl"
|
||||
|
||||
type MainTemplateData struct {
|
||||
@@ -18,7 +18,7 @@ func init() {
|
||||
|
||||
var newCmd = &cobra.Command{
|
||||
Use: "new",
|
||||
Short: "Create a new Keystone project",
|
||||
Long: `Create a new Keystone project with the necessary structure and files.`,
|
||||
Short: "Create a new Draft project",
|
||||
Long: `Create a new Draft project with the necessary structure and files.`,
|
||||
Run: genProject,
|
||||
}
|
||||
+3
-3
@@ -8,9 +8,9 @@ import (
|
||||
)
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "keystone",
|
||||
Short: "Keystone is a CLI tool for bootstrapping Go APIs",
|
||||
Long: `Keystone is a CLI tool built by LKResuts for internal usage to bootstrap Go APIs`,
|
||||
Use: "draft",
|
||||
Short: "Draft is a CLI tool for bootstrapping Go APIs",
|
||||
Long: `Draft is a CLI tool built by LKResuts for internal usage to bootstrap Go APIs`,
|
||||
}
|
||||
|
||||
func Execute() {
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ type ServiceTemplateData struct {
|
||||
var serviceCmd = &cobra.Command{
|
||||
Use: "service",
|
||||
Short: "Create a new service",
|
||||
Long: `Create a new service for your Keystone project.`,
|
||||
Long: `Create a new service for your Draft project.`,
|
||||
Run: genService,
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -15,9 +15,9 @@ func init() {
|
||||
|
||||
var versionCmd = &cobra.Command{
|
||||
Use: "version",
|
||||
Short: "Display the version of Keystone",
|
||||
Long: `Display the current version of the Keystone CLI tool.`,
|
||||
Short: "Display the version of Draft",
|
||||
Long: `Display the current version of the Draft CLI tool.`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
fmt.Printf("Keystone CLI version: %s\n", version)
|
||||
fmt.Printf("Draft CLI version: %s\n", version)
|
||||
},
|
||||
}
|
||||
Reference in new issue
Block a user