Commit 4af4e7ffd9

4af4e7ffd9cf5380ed407e79ab1db098380c5b64

parent: ec51a8678a

Unsigned

Wraient <wraient.911@gmail.com> · 2024-10-19 19:37 UTC

fix: better indentations

Layout: unified · split

cmd/curd/main.go +29 −20
@@ -9,37 +9,46 @@ import (
99 "github.com/wraient/curd/internal"
1010)
1111
12type Title struct {
13 Romanji_title string
14 English_title string
15 Japanese_title string
12type AnimeTitle struct {
13 Romaji string
14 English string
15 Japanese string
1616}
1717
1818type Anime struct {
19 Tit Title
20 Ep Episode
21 Total_episodes int
22 Mal_id int
23 Allanime_id string
19 Tit AnimeTitle
20 Ep Episode
21 TotalEpisodes int
22 MalId int
23 AnilistId int
24 AllanimeId string
2425}
2526
2627type SkipTimes struct {
27 Op int
28 Ed int
28 Op int
29 Ed int
2930}
3031
3132type Episode struct {
32 Tit Title
33 Number int
34 Skip_times SkipTimes
35 Mode string
36 Links []string
37 Is_filler bool
38 Is_recap bool
39 Aired string
40 Synopsis string
33 Tit AnimeTitle
34 Number int
35 Skip_times SkipTimes
36 Mode string
37 Links []string
38 Is_filler bool
39 Is_recap bool
40 Aired string
41 Synopsis string
4142}
4243
44type User struct {
45 token string
46 username string
47 id int
48 animeList internal.AnimeList
49}
50
51
4352func main(){
4453 internal.ClearScreen()
4554 defer internal.RestoreScreen()
internal/anilist.go +8 −7
@@ -10,12 +10,6 @@ import (
1010 "strings"
1111)
1212
13// AnimeTitle represents the title in different languages
14type AnimeTitle struct {
15 Romaji string
16 English string
17 Japanese string
18}
1913
2014// AniListAnime is the struct for the API response
2115type AniListAnime struct {
@@ -37,6 +31,13 @@ type ResponseData struct {
3731 Page Page `json:"Page"`
3832}
3933
34// AnimeTitle represents the title in different languages
35type AnimeTitle struct {
36 Romaji string
37 English string
38 Japanese string
39}
40
4041
4142type Media struct {
4243 Duration int `json:"duration"`
@@ -46,7 +47,7 @@ type Media struct {
4647}
4748
4849type Entry struct {
49 Media Media `json:"media"`
50 Media Media `json:"media"`
5051 Progress int `json:"progress"`
5152 Score float64 `json:"score"`
5253 Status string `json:"status"`