Skip to content

Commit d280fe0

Browse files
committed
Changed cube constructor
Signed-off-by: Vishal Rana <[email protected]>
1 parent 84298dd commit d280fe0

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

cube/cube.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ type (
6868
// }
6969
)
7070

71-
func New(apiKey string, options Options) *Cube {
71+
func New(apiKey string) *Cube {
72+
return NewWithOptions(apiKey, Options{})
73+
}
74+
75+
func NewWithOptions(apiKey string, options Options) *Cube {
7276
c := &Cube{
7377
startTime: time.Now().Unix(),
7478
client: resty.New().

echo/echo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func Cube(apiKey string) echo.MiddlewareFunc {
1313
}
1414

1515
func CubeWithOptions(apiKey string, options cube.Options) echo.MiddlewareFunc {
16-
c := cube.New(apiKey, options)
16+
c := cube.NewWithOptions(apiKey, options)
1717

1818
return func(next echo.HandlerFunc) echo.HandlerFunc {
1919
return func(ctx echo.Context) (err error) {

0 commit comments

Comments
 (0)