grafeas / grafeas/voucher

refactor check handling functions

Open
#17 0 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
Go
Stars
75
Forks
19
PR merge metrics
No merged PRs in 30d

Description

there are now 2 spots ([1](https://github.com/grafeas/voucher/blob/main/server/check.go#L17), [2](https://github.com/grafeas/voucher/blob/main/subscriber/check.go#L14)) where we have similar enough logic and we should consider refactoring these into a single spot. things to keep in mind:

- we probably want to split this up into multiple functions
- we want to avoid import loops (because we're using the `config` pkg to initialize new clients and whatnot)

Contributor guide

Open the contributing guide

Research direction

Start by comparing the duplicated logic in server/check.go and subscriber/check.go. Review how the config package initializes clients and trace the package dependencies before deciding where shared functions can live. Done means the check handling is consolidated without introducing import loops.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.