Skip to content

Commit

Permalink
Apply betteralign
Browse files Browse the repository at this point in the history
Tool that helps reduce memory waste in structs: https://github.com/dkorunic/betteralign
  • Loading branch information
Flexicon committed Mar 25, 2023
1 parent 5698388 commit 3b3eaec
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion github_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (
)

type GitHubAPI struct {
httpc *http.Client
user string
token string
httpc *http.Client
}

func NewGitHubAPI() *GitHubAPI {
Expand Down
4 changes: 2 additions & 2 deletions handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ func commitLogHandler(db *gorm.DB) echo.HandlerFunc {

func statsHandler(db *gorm.DB) echo.HandlerFunc {
type DailyStatsResults struct {
Count int64
Date time.Time
Count int64
}

type CachedStats struct {
TotalCommits int64
DailyStats []*DailyStatsResults
TotalCommits int64
}

var statsCache *CachedStats
Expand Down
2 changes: 1 addition & 1 deletion model.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
//
// https://docs.github.com/en/free-pro-team@latest/rest/reference/search#search-commits
type SearchResults struct {
Items []SearchResultItem `json:"items"`
TotalCount int `json:"total_count"`
IncompleteResults bool `json:"incomplete_results"`
Items []SearchResultItem `json:"items"`
}

// SearchResultItem represents an individual item in the search results for the Github search commits API
Expand Down

0 comments on commit 3b3eaec

Please sign in to comment.