Files
probo/.cursor/rules/go-imports.mdc
Émile Ré 8f8f09008a Version Cursor rules
Track .cursor/rules/ in git so coding conventions are shared
across the team. Everything else under .cursor/ stays ignored.

Signed-off-by: Émile Ré <emile@probo.com>
2026-05-19 14:10:39 +04:00

42 lines
703 B
Plaintext

---
description: Go import ordering — stdlib first, then third-party and internal together
globs: "**/*.go"
alwaysApply: false
---
# Go import ordering
Two groups separated by a blank line:
1. Standard library
2. Everything else (third-party and internal sorted together alphabetically)
```go
// GOOD
import (
"context"
"errors"
"fmt"
"github.com/go-chi/chi/v5"
"go.gearno.de/kit/log"
"go.probo.inc/probo/pkg/iam"
)
// BAD — three groups (stdlib / third-party / internal separated)
import (
"context"
"fmt"
"github.com/go-chi/chi/v5"
"go.probo.inc/probo/pkg/iam"
)
// BAD — no separation at all
import (
"context"
"github.com/go-chi/chi/v5"
"go.probo.inc/probo/pkg/iam"
)
```