Skip to content

Commit

Permalink
remove time
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Sep 22, 2024
1 parent 96a4977 commit 0f98c35
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
10 changes: 0 additions & 10 deletions src/Generator/Type/Go.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,6 @@ protected function getString(): string
return 'string';
}

protected function getStringFormat(Format $format): string
{
return match ($format) {
Format::DATE => 'time.Time',
Format::DATETIME => 'time.Time',
Format::TIME => 'time.Time',
default => $this->getString(),
};
}

protected function getInteger(): string
{
return 'int';
Expand Down
6 changes: 3 additions & 3 deletions tests/Generator/resource/go/go.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@ type News struct {
Source any `json:"source"`
Author *Author `json:"author"`
Meta *Meta `json:"meta"`
SendDate time.Time `json:"sendDate"`
ReadDate time.Time `json:"readDate"`
SendDate string `json:"sendDate"`
ReadDate string `json:"readDate"`
Expires string `json:"expires"`
Range string `json:"range"`
Price float64 `json:"price"`
Rating int `json:"rating"`
Content string `json:"content"`
Question string `json:"question"`
Version string `json:"version"`
CoffeeTime time.Time `json:"coffeeTime"`
CoffeeTime string `json:"coffeeTime"`
ProfileUri string `json:"profileUri"`
Captcha string `json:"g-recaptcha-response"`
MediaFields string `json:"media.fields"`
Expand Down

0 comments on commit 0f98c35

Please sign in to comment.