Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,5 +220,7 @@ func NewConfigCmd() *cobra.Command {

## Code Style Guidelines

### Naming Conventions
- **Use `Id` instead of `ID`**: Throughout the codebase, prefer `Id` over `ID` for consistency (e.g., `UserId`, `SpaceId`, `ObjectId`)
- **Constants**: Centralize all configuration values, paths, URLs, and time intervals in `core/config/constants.go`
- **User Output**: Always use `core/output` package functions (`output.Success()`, `output.Error()`, `output.Warning()`, `output.Info()`) instead of `fmt.Printf/Println`
- **No Emojis**: Avoid emojis in output messages unless explicitly requested
- **Use `Id` instead of `ID`**: Throughout the codebase, prefer `Id` over `ID` for consistency (e.g., `UserId`, `SpaceId`, `ObjectId`)
16 changes: 8 additions & 8 deletions cmd/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"github.com/anyproto/anytype-cli/core/serviceprogram"
)

// getService creates a service instance with our standard configuration
func getService() (service.Service, error) {
// GetService creates a service instance with our standard configuration
func GetService() (service.Service, error) {
options := service.KeyValue{
"UserService": true,
}
Expand Down Expand Up @@ -81,7 +81,7 @@ func NewServiceCmd() *cobra.Command {
}

func installService(cmd *cobra.Command, args []string) error {
s, err := getService()
s, err := GetService()
if err != nil {
return output.Error("Failed to create service: %w", err)
}
Expand All @@ -102,7 +102,7 @@ func installService(cmd *cobra.Command, args []string) error {
}

func uninstallService(cmd *cobra.Command, args []string) error {
s, err := getService()
s, err := GetService()
if err != nil {
return output.Error("Failed to create service: %w", err)
}
Expand All @@ -117,7 +117,7 @@ func uninstallService(cmd *cobra.Command, args []string) error {
}

func startService(cmd *cobra.Command, args []string) error {
s, err := getService()
s, err := GetService()
if err != nil {
return output.Error("Failed to create service: %w", err)
}
Expand All @@ -140,7 +140,7 @@ func startService(cmd *cobra.Command, args []string) error {
}

func stopService(cmd *cobra.Command, args []string) error {
s, err := getService()
s, err := GetService()
if err != nil {
return output.Error("Failed to create service: %w", err)
}
Expand All @@ -163,7 +163,7 @@ func stopService(cmd *cobra.Command, args []string) error {
}

func restartService(cmd *cobra.Command, args []string) error {
s, err := getService()
s, err := GetService()
if err != nil {
return output.Error("Failed to create service: %w", err)
}
Expand All @@ -186,7 +186,7 @@ func restartService(cmd *cobra.Command, args []string) error {
}

func statusService(cmd *cobra.Command, args []string) error {
s, err := getService()
s, err := GetService()
if err != nil {
return output.Error("Failed to create service: %w", err)
}
Expand Down
Loading
Loading