-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from lazygophers/luoxin
多语言支持
- Loading branch information
Showing
178 changed files
with
6,363 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package gen | ||
|
||
import ( | ||
"github.com/lazygophers/codegen/codegen" | ||
"github.com/lazygophers/log" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var gitignoreCmd = &cobra.Command{ | ||
Use: "gitignote", | ||
Short: "Generate .gitignote file", | ||
RunE: runGitignote, | ||
} | ||
|
||
func runGitignote(cmd *cobra.Command, args []string) (err error) { | ||
err = codegen.GenerateGitignote(pb) | ||
if err != nil { | ||
log.Errorf("err:%v", err) | ||
return err | ||
} | ||
|
||
return nil | ||
} | ||
|
||
var genDockerignoteCmd = &cobra.Command{ | ||
Use: "dockerignore", | ||
Short: "Generate .dockerignore file", | ||
RunE: runDockerignote, | ||
} | ||
|
||
func runDockerignote(cmd *cobra.Command, args []string) (err error) { | ||
err = codegen.GenerateDockerignote(pb) | ||
if err != nil { | ||
log.Errorf("err:%v", err) | ||
return err | ||
} | ||
|
||
return nil | ||
} | ||
|
||
func init() { | ||
genCmd.AddCommand(gitignoreCmd, genDockerignoteCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.