Skip to content

Code rules #36

Description

@beanbocchi
  • errors:
    • no nude return err
    • if restate function, use sharemodel.WrapErr("msg", err)
    • err message
      • should describe all context of the function just invoked (doSth), not the parent (ServiceA)
      • Eg: func ServiceA() { if err := doSth(..); err ≠ nil { return WrapErr("doSth", err)} }
      • if database related function then should prefix "db", eg: "db query cards", "openai query", "milvus insert"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions