INNER CODE UNIT · Go

printPaths

kopecmaciej/vi-mongo · cmd/cmd.go:254

func printPaths() {
	configDir, err := util.GetConfigDir()
	if err != nil {
		fatalf("resolving config directory: %v", err)
	}
	fmt.Printf("Config:      %s/config.yaml\n", configDir)
	fmt.Printf("Keybindings: %s/keybindings.yaml\n", configDir)
	fmt.Printf("Styles:      %s/styles/\n", configDir)
	fmt.Printf("Log:         %s\n", config.LogPath)
}

func validateDirectNavigateFormat(format string) error {
	parts := strings.Split(format, "/")
	if len(parts) != 2 {
		return fmt.Errorf("format should be db-name/collection-name")
	}
	if len(parts[0]) == 0 || len(parts[1]) == 0 {
		return fmt.Errorf("both db-name and collection-name are required")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…