fix: redis version on ci

This commit is contained in:
Reinaldy Rafli 2023-08-12 12:36:08 +07:00
parent e949b11ab9
commit 9aedbc6648
Signed by: aldy505
GPG Key ID: A3F8A7E23DA2AD94
20 changed files with 726 additions and 697 deletions

View File

@ -3,12 +3,12 @@ root = true
[*] [*]
charset = utf-8 charset = utf-8
end_of_line = lf end_of_line = lf
indent_size = 4 indent_size = 2
indent_style = space indent_style = space
insert_final_newline = false insert_final_newline = false
max_line_length = 120 max_line_length = 120
tab_width = 4 tab_width = 2
ij_continuation_indent_size = 8 ij_continuation_indent_size = 4
ij_formatter_off_tag = @formatter:off ij_formatter_off_tag = @formatter:off
ij_formatter_on_tag = @formatter:on ij_formatter_on_tag = @formatter:on
ij_formatter_tags_enabled = true ij_formatter_tags_enabled = true
@ -30,7 +30,7 @@ ij_css_hex_color_upper_case = false
ij_css_keep_blank_lines_in_code = 2 ij_css_keep_blank_lines_in_code = 2
ij_css_keep_indents_on_empty_lines = false ij_css_keep_indents_on_empty_lines = false
ij_css_keep_single_line_blocks = false ij_css_keep_single_line_blocks = false
ij_css_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow ij_css_properties_order = font, font-family, font-size, font-weight, font-style, font-variant, font-size-adjust, font-stretch, line-height, position, z-index, top, right, bottom, left, display, visibility, float, clear, overflow, overflow-x, overflow-y, clip, zoom, align-content, align-items, align-self, flex, flex-flow, flex-basis, flex-direction, flex-grow, flex-shrink, flex-wrap, justify-content, order, box-sizing, width, min-width, max-width, height, min-height, max-height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-top, padding-right, padding-bottom, padding-left, table-layout, empty-cells, caption-side, border-spacing, border-collapse, list-style, list-style-position, list-style-type, list-style-image, content, quotes, counter-reset, counter-increment, resize, cursor, user-select, nav-index, nav-up, nav-right, nav-down, nav-left, transition, transition-delay, transition-timing-function, transition-duration, transition-property, transform, transform-origin, animation, animation-name, animation-duration, animation-play-state, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, text-align, text-align-last, vertical-align, white-space, text-decoration, text-emphasis, text-emphasis-color, text-emphasis-style, text-emphasis-position, text-indent, text-justify, letter-spacing, word-spacing, text-outline, text-transform, text-wrap, text-overflow, text-overflow-ellipsis, text-overflow-mode, word-wrap, word-break, tab-size, hyphens, pointer-events, opacity, color, border, border-width, border-style, border-color, border-top, border-top-width, border-top-style, border-top-color, border-right, border-right-width, border-right-style, border-right-color, border-bottom, border-bottom-width, border-bottom-style, border-bottom-color, border-left, border-left-width, border-left-style, border-left-color, border-radius, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius, border-image, border-image-source, border-image-slice, border-image-width, border-image-outset, border-image-repeat, outline, outline-width, outline-style, outline-color, outline-offset, background, background-color, background-image, background-repeat, background-attachment, background-position, background-position-x, background-position-y, background-clip, background-origin, background-size, box-decoration-break, box-shadow, text-shadow
ij_css_space_after_colon = true ij_css_space_after_colon = true
ij_css_space_before_opening_brace = true ij_css_space_before_opening_brace = true
ij_css_use_double_quotes = true ij_css_use_double_quotes = true
@ -60,7 +60,7 @@ ij_sass_keep_indents_on_empty_lines = false
ij_sass_keep_single_line_blocks = false ij_sass_keep_single_line_blocks = false
ij_sass_line_comment_add_space = false ij_sass_line_comment_add_space = false
ij_sass_line_comment_at_first_column = false ij_sass_line_comment_at_first_column = false
ij_sass_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow ij_sass_properties_order = font, font-family, font-size, font-weight, font-style, font-variant, font-size-adjust, font-stretch, line-height, position, z-index, top, right, bottom, left, display, visibility, float, clear, overflow, overflow-x, overflow-y, clip, zoom, align-content, align-items, align-self, flex, flex-flow, flex-basis, flex-direction, flex-grow, flex-shrink, flex-wrap, justify-content, order, box-sizing, width, min-width, max-width, height, min-height, max-height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-top, padding-right, padding-bottom, padding-left, table-layout, empty-cells, caption-side, border-spacing, border-collapse, list-style, list-style-position, list-style-type, list-style-image, content, quotes, counter-reset, counter-increment, resize, cursor, user-select, nav-index, nav-up, nav-right, nav-down, nav-left, transition, transition-delay, transition-timing-function, transition-duration, transition-property, transform, transform-origin, animation, animation-name, animation-duration, animation-play-state, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, text-align, text-align-last, vertical-align, white-space, text-decoration, text-emphasis, text-emphasis-color, text-emphasis-style, text-emphasis-position, text-indent, text-justify, letter-spacing, word-spacing, text-outline, text-transform, text-wrap, text-overflow, text-overflow-ellipsis, text-overflow-mode, word-wrap, word-break, tab-size, hyphens, pointer-events, opacity, color, border, border-width, border-style, border-color, border-top, border-top-width, border-top-style, border-top-color, border-right, border-right-width, border-right-style, border-right-color, border-bottom, border-bottom-width, border-bottom-style, border-bottom-color, border-left, border-left-width, border-left-style, border-left-color, border-radius, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius, border-image, border-image-source, border-image-slice, border-image-width, border-image-outset, border-image-repeat, outline, outline-width, outline-style, outline-color, outline-offset, background, background-color, background-image, background-repeat, background-attachment, background-position, background-position-x, background-position-y, background-clip, background-origin, background-size, box-decoration-break, box-shadow, text-shadow
ij_sass_space_after_colon = true ij_sass_space_after_colon = true
ij_sass_space_before_opening_brace = true ij_sass_space_before_opening_brace = true
ij_sass_use_double_quotes = true ij_sass_use_double_quotes = true
@ -114,7 +114,7 @@ ij_typescript_array_initializer_wrap = off
ij_typescript_assignment_wrap = off ij_typescript_assignment_wrap = off
ij_typescript_binary_operation_sign_on_next_line = false ij_typescript_binary_operation_sign_on_next_line = false
ij_typescript_binary_operation_wrap = off ij_typescript_binary_operation_wrap = off
ij_typescript_blacklist_imports = rxjs/Rx,node_modules/**,**/node_modules/**,@angular/material,@angular/material/typings/** ij_typescript_blacklist_imports = rxjs/Rx, node_modules/**, **/node_modules/**, @angular/material, @angular/material/typings/**
ij_typescript_blank_lines_after_imports = 1 ij_typescript_blank_lines_after_imports = 1
ij_typescript_blank_lines_around_class = 1 ij_typescript_blank_lines_around_class = 1
ij_typescript_blank_lines_around_field = 0 ij_typescript_blank_lines_around_field = 0
@ -297,7 +297,7 @@ ij_javascript_array_initializer_wrap = off
ij_javascript_assignment_wrap = off ij_javascript_assignment_wrap = off
ij_javascript_binary_operation_sign_on_next_line = false ij_javascript_binary_operation_sign_on_next_line = false
ij_javascript_binary_operation_wrap = off ij_javascript_binary_operation_wrap = off
ij_javascript_blacklist_imports = rxjs/Rx,node_modules/**,**/node_modules/**,@angular/material,@angular/material/typings/** ij_javascript_blacklist_imports = rxjs/Rx, node_modules/**, **/node_modules/**, @angular/material, @angular/material/typings/**
ij_javascript_blank_lines_after_imports = 1 ij_javascript_blank_lines_after_imports = 1
ij_javascript_blank_lines_around_class = 1 ij_javascript_blank_lines_around_class = 1
ij_javascript_blank_lines_around_field = 0 ij_javascript_blank_lines_around_field = 0

View File

@ -2,7 +2,7 @@ name: CI
on: on:
push: push:
branches: ["master"] branches: [ "master" ]
jobs: jobs:
api-build: api-build:
@ -29,7 +29,7 @@ jobs:
volumes: volumes:
- minio-data:/data - minio-data:/data
redis: redis:
image: redis:7.0.2-bookworm image: redis:7.0.12-bookworm
ports: ports:
- 6379:6379 - 6379:6379
defaults: defaults:

View File

@ -2,7 +2,7 @@ name: PR
on: on:
pull_request: pull_request:
branches: ["*"] branches: [ "*" ]
jobs: jobs:
client-build: client-build:
@ -18,7 +18,7 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Installling dependencies - name: Install dependencies
run: npm install run: npm install
- name: Lint - name: Lint
@ -66,7 +66,7 @@ jobs:
volumes: volumes:
- minio-data:/data - minio-data:/data
redis: redis:
image: redis:7.0.2-bookworm image: redis:7.0.12-bookworm
ports: ports:
- 6379:6379 - 6379:6379
defaults: defaults:

View File

@ -1,14 +1,19 @@
# Contributing Guide # Contributing Guide
First of all. Thank you for considering to contribute on Jokes Bapak2 API project. I hope this project will get better and we will become more bapak2 than ever. First of all. Thank you for considering to contribute on Jokes Bapak2 API project. I hope this project will get better
and we will become more bapak2 than ever.
This project is a monorepo, meaning the backend, frontend, and Github CI are all in one place (one repository). Before you do anything, if you're going to do some breaking change or you'll write (or remove) large numbers of LOC (line of codes), please open an issue first and let us know about it. So that our work won't bother you and you'll have a breeze on developing this. This project is a monorepo, meaning the backend, frontend, and Github CI are all in one place (one repository). Before
you do anything, if you're going to do some breaking change or you'll write (or remove) large numbers of LOC (line of
codes), please open an issue first and let us know about it. So that our work won't bother you and you'll have a breeze
on developing this.
## Project Prerequisites && Setup ## Project Prerequisites && Setup
### Front End (`./client`) ### Front End (`./client`)
You'll have to install: You'll have to install:
* Node.js LTS (preferably with [fnm](https://github.com/Schniz/fnm) or [nvm](https://github.com/nvm-sh/nvm)) * Node.js LTS (preferably with [fnm](https://github.com/Schniz/fnm) or [nvm](https://github.com/nvm-sh/nvm))
* Yarn v1 * Yarn v1
@ -17,6 +22,7 @@ See the [README](./client/README.md) on client for detailed project setup.
### Back End (`./api`) ### Back End (`./api`)
You'll have to install: You'll have to install:
* Go v1.16.x * Go v1.16.x
* (Optional) [Fiber CLI](https://github.com/gofiber/cli) for ease of development * (Optional) [Fiber CLI](https://github.com/gofiber/cli) for ease of development
@ -24,9 +30,11 @@ See the [README](./api/README.md) on client for detailed project setup.
### With Docker Compose ### With Docker Compose
If you're just developing the front end and too lazy installing Go and such (or the other way around), you can use `docker-compose` file specified on the main page. If you're just developing the front end and too lazy installing Go and such (or the other way around), you can
use `docker-compose` file specified on the main page.
You'll have to install: You'll have to install:
* Docker (preferably with Docker Desktop if you're on Windows or Mac) * Docker (preferably with Docker Desktop if you're on Windows or Mac)
* Docker Compose * Docker Compose
@ -55,20 +63,24 @@ $ docker-compose down
### Front End (`./client`) ### Front End (`./client`)
Please run these: Please run these:
* `yarn lint` * `yarn lint`
* `yarn format` * `yarn format`
* `yarn build` * `yarn build`
If those command didn't pass, please fix the problem first. Please recheck your changes, make sure NOT to leave any secret token/keys behind. If those command didn't pass, please fix the problem first. Please recheck your changes, make sure NOT to leave any
secret token/keys behind.
### Back End (`./api`) ### Back End (`./api`)
Please run these: Please run these:
* `go fmt` * `go fmt`
* `go build main.go` * `go build main.go`
* `go test -v -race -coverprofile=coverage.out -covermode=atomic ./...` * `go test -v -race -coverprofile=coverage.out -covermode=atomic ./...`
If those command didn't pass, please fix the problem first. Please recheck your changes, make sure NOT to leave any secret token/keys behind. If those command didn't pass, please fix the problem first. Please recheck your changes, make sure NOT to leave any
secret token/keys behind.
## One more thing.. ## One more thing..

View File

@ -7,15 +7,19 @@
<br> <br>
</h1> </h1>
👋 Hey there! Always a work in progress, if you'd like to contribute this while this repo is still growing, that would be so great! 👋 Hey there! Always a work in progress, if you'd like to contribute this while this repo is still growing, that would be
so great!
ou can access the front facing web on [jokesbapak2.reinaldyrafli.com](http://jokesbapak2.reinaldyrafli.com/). ou can access the front facing web on [jokesbapak2.reinaldyrafli.com](http://jokesbapak2.reinaldyrafli.com/).
## Brief explanation of what is this ## Brief explanation of what is this
Jokes Bapak2 is an image API that you can use for free! I've been seeing lots and lots of Indonesian dad jokes on Twitter, Facebook and Instagram on early 2020. In a month, I made a Discord bot that provides the jokes. But I thought, why not make it as an API? Jokes Bapak2 is an image API that you can use for free! I've been seeing lots and lots of Indonesian dad jokes on
Twitter, Facebook and Instagram on early 2020. In a month, I made a Discord bot that provides the jokes. But I thought,
why not make it as an API?
This is some kind of [icanhazdadjokes](https://icanhazdadjoke.com/) but it's Indonesian and it's not text, it's images. Dad jokes in Indonesia is somewhat a bit different than in US/UK because, I guess, here, it's a lot dumber. This is some kind of [icanhazdadjokes](https://icanhazdadjoke.com/) but it's Indonesian and it's not text, it's images.
Dad jokes in Indonesia is somewhat a bit different than in US/UK because, I guess, here, it's a lot dumber.
## Project Directories ## Project Directories
@ -24,29 +28,31 @@ This is some kind of [icanhazdadjokes](https://icanhazdadjoke.com/) but it's Ind
You can consume this API via a website (linked in the front facing web) with a few endpoints: You can consume this API via a website (linked in the front facing web) with a few endpoints:
* `/` - Random jokes bapak2 * `/` - Random jokes bapak2
* `/id/{number}` - Jokes bapak2 based on ID * `/id/{number}` - Jokes bapak2 based on ID
* `/today` - Jokes bapak2 of the day * `/today` - Jokes bapak2 of the day
* `/total` - Total available jokes bapak2 * `/total` - Total available jokes bapak2
Currently I'm (still) searching for an alternative for AWS S3 that I can use for free. Currently I'm (still) searching for an alternative for AWS S3 that I can use for free.
## Tech stacks ## Tech stacks
* Go (for `api` / back end) * Go (for `api` / back end)
* Node.js (for `client` / front end) * Node.js (for `client` / front end)
* Postgres * Postgres
* Redis * Redis
That's it. That's it.
## Development ## Development
Two ways of doing this: Two ways of doing this:
1. Install all the tech stack on your local machine
2. Using docker-compose
See [CONTRIBUTING](./CONTRIBUTING.md) or README files on each project directory for further instruction on how to run the development environment. 1. Install all the tech stack on your local machine
2. Using docker-compose
See [CONTRIBUTING](./CONTRIBUTING.md) or README files on each project directory for further instruction on how to run
the development environment.
## Thanks to ## Thanks to

View File

@ -17,12 +17,13 @@ $ go run main.go
$ go build main.go $ go build main.go
``` ```
There is a placeholder data ready for you to query it manually in `/platform/database/placeholder.sql`. Have a good time developing! There is a placeholder data ready for you to query it manually in `/platform/database/placeholder.sql`. Have a good time
developing!
## Used packages ## Used packages
| Name | Version | Type | | Name | Version | Type |
| --- | --- | --- | |------------------------------------------------------------------|--------------------------------------|-----------|
| [gofiber/fiber](https://github.com/gofiber/fiber) | `v2.21.0` | Framework | | [gofiber/fiber](https://github.com/gofiber/fiber) | `v2.21.0` | Framework |
| [jackc/pgx](https://github.com/jackc/pgx) | `v4.13.0` | Database | | [jackc/pgx](https://github.com/jackc/pgx) | `v4.13.0` | Database |
| [go-redis/redis](https://github.com/go-redis/redis) | `v8.11.4` | Cache | | [go-redis/redis](https://github.com/go-redis/redis) | `v8.11.4` | Cache |

View File

@ -2,9 +2,10 @@ package joke_test
import ( import (
"context" "context"
"jokes-bapak2-api/core/joke"
"testing" "testing"
"time" "time"
"jokes-bapak2-api/core/joke"
) )
func TestGetRandomJoke(t *testing.T) { func TestGetRandomJoke(t *testing.T) {

View File

@ -2,9 +2,10 @@ package joke_test
import ( import (
"context" "context"
"jokes-bapak2-api/core/joke"
"testing" "testing"
"time" "time"
"jokes-bapak2-api/core/joke"
) )
func TestListJokeFromBucket(t *testing.T) { func TestListJokeFromBucket(t *testing.T) {

View File

@ -2,9 +2,10 @@ package joke_test
import ( import (
"context" "context"
"jokes-bapak2-api/core/joke"
"testing" "testing"
"time" "time"
"jokes-bapak2-api/core/joke"
) )
func TestGetTodaysJoke(t *testing.T) { func TestGetTodaysJoke(t *testing.T) {

View File

@ -2,9 +2,10 @@ package joke_test
import ( import (
"context" "context"
"jokes-bapak2-api/core/joke"
"testing" "testing"
"time" "time"
"jokes-bapak2-api/core/joke"
) )
func TestGetTotalJoke(t *testing.T) { func TestGetTotalJoke(t *testing.T) {

View File

@ -31,9 +31,9 @@ paths:
200: 200:
description: Image data description: Image data
content: content:
"image/gif": {} "image/gif": { }
"image/png": {} "image/png": { }
"image/jpeg": {} "image/jpeg": { }
put: put:
summary: Add a new joke into database summary: Add a new joke into database
description: asd description: asd
@ -88,9 +88,9 @@ paths:
200: 200:
description: Image data description: Image data
content: content:
"image/jpeg": {} "image/jpeg": { }
"image/png": {} "image/png": { }
"image/gif": {} "image/gif": { }
404: 404:
description: Provided image ID was not found description: Provided image ID was not found
content: content:
@ -164,9 +164,9 @@ paths:
200: 200:
description: Image data description: Image data
content: content:
"image/jpeg": {} "image/jpeg": { }
"image/png": {} "image/png": { }
"image/gif": {} "image/gif": { }
/total: /total:
get: get:
summary: Get total amount of jokes in database summary: Get total amount of jokes in database

View File

@ -1,10 +1,11 @@
package joke package joke
import ( import (
core "jokes-bapak2-api/core/joke"
"net/http" "net/http"
"strconv" "strconv"
core "jokes-bapak2-api/core/joke"
"github.com/go-chi/chi/v5" "github.com/go-chi/chi/v5"
) )

View File

@ -1,9 +1,10 @@
package joke package joke
import ( import (
core "jokes-bapak2-api/core/joke"
"net/http" "net/http"
"strconv" "strconv"
core "jokes-bapak2-api/core/joke"
) )
// TotalJokes provides a HTTP handler for acquiring total jokes // TotalJokes provides a HTTP handler for acquiring total jokes

View File

@ -1,14 +1,15 @@
package main package main
import ( import (
"context"
"errors" "errors"
"log" "log"
"net" "net"
"net/http" "net/http"
"os" "os"
"os/signal" "os/signal"
"time"
"context"
"jokes-bapak2-api/core/joke" "jokes-bapak2-api/core/joke"
"jokes-bapak2-api/routes" "jokes-bapak2-api/routes"
@ -16,8 +17,6 @@ import (
"github.com/minio/minio-go/v7" "github.com/minio/minio-go/v7"
"github.com/minio/minio-go/v7/pkg/credentials" "github.com/minio/minio-go/v7/pkg/credentials"
"time"
"github.com/allegro/bigcache/v3" "github.com/allegro/bigcache/v3"
"github.com/getsentry/sentry-go" "github.com/getsentry/sentry-go"
"github.com/go-chi/chi/v5" "github.com/go-chi/chi/v5"

View File

@ -1,8 +1,9 @@
package utils_test package utils_test
import ( import (
"jokes-bapak2-api/utils"
"testing" "testing"
"jokes-bapak2-api/utils"
) )
func TestIsIn_True(t *testing.T) { func TestIsIn_True(t *testing.T) {

View File

@ -1,9 +1,10 @@
package utils_test package utils_test
import ( import (
"jokes-bapak2-api/utils"
"testing" "testing"
"time" "time"
"jokes-bapak2-api/utils"
) )
func TestIsToday_Today(t *testing.T) { func TestIsToday_Today(t *testing.T) {

View File

@ -1,9 +1,10 @@
package utils_test package utils_test
import ( import (
"jokes-bapak2-api/utils"
"strings" "strings"
"testing" "testing"
"jokes-bapak2-api/utils"
) )
func TestParseToJSONBody(t *testing.T) { func TestParseToJSONBody(t *testing.T) {

View File

@ -1,8 +1,9 @@
package utils_test package utils_test
import ( import (
"jokes-bapak2-api/utils"
"testing" "testing"
"jokes-bapak2-api/utils"
) )
func TestRandomString_Valid(t *testing.T) { func TestRandomString_Valid(t *testing.T) {

View File

@ -1,9 +1,10 @@
package utils_test package utils_test
import ( import (
"jokes-bapak2-api/utils"
"net/http" "net/http"
"testing" "testing"
"jokes-bapak2-api/utils"
) )
func TestRequest_Get(t *testing.T) { func TestRequest_Get(t *testing.T) {

View File

@ -15,5 +15,5 @@ $ yarn start
## Used package ## Used package
| Name | Version | Type | | Name | Version | Type |
| --- | --- | --- | |---------------------------------------------------------------|----------|-------------------|
| [mcollina/autocannon](https://github.com/mcollina/autocannon) | `v7.4.0` | Benchmarking Tool | | [mcollina/autocannon](https://github.com/mcollina/autocannon) | `v7.4.0` | Benchmarking Tool |