Skip to content

Commit

Permalink
Remove useless pointer
Browse files Browse the repository at this point in the history
The boolean does not need to be a pointer (default value, false, is fine).
  • Loading branch information
McKael committed Apr 3, 2018
1 parent 247e877 commit cd4b3eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions gh/checkrelease.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (c *Config) getOldState(repo string) RepoState {
return RepoState{Repo: repo}
}

func (c *Config) checkRepoReleases(ctx context.Context, wID int, prereleases *bool, prevState RepoState) (*Release, error) {
func (c *Config) checkRepoReleases(ctx context.Context, wID int, prereleases bool, prevState RepoState) (*Release, error) {
client := c.client

pp := strings.Split(prevState.Repo, "/")
Expand Down Expand Up @@ -192,7 +192,7 @@ func (c *Config) checkRepoReleases(ctx context.Context, wID int, prereleases *bo

if r.Prerelease != nil && *r.Prerelease {
// This is a pre-release
if prereleases == nil || !*prereleases {
if !prereleases {
continue
}
}
Expand Down
3 changes: 2 additions & 1 deletion gh/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ type Config struct {
client *github.Client
}

// RepoConfig contains the user configuration for a single repository
type RepoConfig struct {
Repo string `json:"repo"` // owner/repo_name
Prereleases *bool `json:"prereleases"` // include prereleases
Prereleases bool `json:"prereleases"` // include prereleases
}

// States is a struct that contains the states of all checked releases
Expand Down

0 comments on commit cd4b3eb

Please sign in to comment.