Skip to content

api: return structs #621

@CNLHC

Description

@CNLHC

func ListAnnotations(ctx *model.Context, selectedPages types.IntSet) (int, []string, error) {

currently, the ListAnnotation API returns a string array and each element in the array represents a line in the formatted output.

The extra parsing work is very inconvenient for the downstream program to integrate with this API.

What do you think about splitting the output format logic and annotations list logic? The API can return a Golang object and the cmd module can cover the formatting work.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions