andygrunwald / andygrunwald/go-jira

Think about to make use of functional options

未关闭
#479 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
breaking-change v2
主要语言
Go
星标
1.6k
派生
500
PR 合并指标
30 天内没有已合并 PR

描述

## Context

Many API endpoints (or even the "NewClient" function) make use of optional options.
Those are very often a struct. If you don't require options, you pass nil.

An alternative would be https://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis

## Goal of this task

* Think about this solution, if this is feasible
* Start a prototype / proof of concept

This request comes from https://github.com/andygrunwald/go-jira/issues/200.
An own ticket was created to keep the development contained and focus the discussion.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。