Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AppName = "gkill_server" IDFCmd = &cobra.Command{ Use: "idf", Run: func(cmd *cobra.Command, args []string) { if len(args) == 0 { cmd.Usage() return } targetDirs := args autoIDF := false router := mux.NewRouter() idfIgnore := gkill_options.IDFIgnore for _, filenamePattern := range targetDirs { filenamePattern = os.ExpandEnv(filenamePattern) matchFiles, _ := zglob.Glob(filenamePattern) for _, filename := range matchFiles { if _, err := os.Stat(filename); os.IsNotExist(err) { fmt.Printf("Directory not found. skip idf: %s\n", filename) continue } parentDir := filepath.Join(filename, ".gkill") err := os.MkdirAll(os.ExpandEnv(parentDir), os.ModePerm) if err != nil { err = fmt.Errorf("error at make directory %s: %w", parentDir, err) fmt.Printf("%s\n", err) fmt.Printf("skip idf: %s\n", filename) continue } idDBFilename := filepath.Join(parentDir, "gkill_id.db") idfKyouRep, err := reps.NewIDFDirRep(context.TODO(), filename, idDBFilename, router, &autoIDF, &idfIgnore, nil) if err != nil { err = fmt.Errorf("error at new idf dir rep: %w", err) gkill_log.Debug.Println(err.Error()) fmt.Printf("skip idf: %s\n", filename) continue } defer idfKyouRep.Close(context.TODO()) idfKyouRep.IDF(context.TODO()) } } }, } DVNFCmd = dvnf_cmd.DVNFCmd VersionCommand = &cobra.Command{ Use: "version", Run: func(cmd *cobra.Command, args []string) { version, err := GetVersion() if err != nil { println(err.Error()) return } fmt.Printf("%s: %s\n", AppName, version) }, } )
Functions ¶
func GetGkillServerAPI ¶
func GetGkillServerAPI() *api.GkillServerAPI
func GetVersion ¶
func InitGkillOptions ¶
func InitGkillOptions()
func InitGkillServerAPI ¶
func InitGkillServerAPI() error
func LaunchGkillServerAPI ¶
func LaunchGkillServerAPI() error
func Openbrowser ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.