Delete unused code
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
This commit is contained in:
parent
23ed51efcc
commit
e49f4bf738
1 changed files with 0 additions and 39 deletions
39
reddit.go
39
reddit.go
|
@ -360,38 +360,6 @@ type ListOptions struct {
|
|||
Before string `url:"before,omitempty"`
|
||||
}
|
||||
|
||||
// Value returns the value stored in the pointer.
|
||||
func (o *ListOptions) Value() ListOptions {
|
||||
if o == nil {
|
||||
return ListOptions{}
|
||||
}
|
||||
return *o
|
||||
}
|
||||
|
||||
// GetLimit returns the limit option.
|
||||
func (o *ListOptions) GetLimit() int {
|
||||
if o == nil {
|
||||
return 0
|
||||
}
|
||||
return o.Limit
|
||||
}
|
||||
|
||||
// GetAfter returns the after option.
|
||||
func (o *ListOptions) GetAfter() string {
|
||||
if o == nil {
|
||||
return ""
|
||||
}
|
||||
return o.After
|
||||
}
|
||||
|
||||
// GetBefore returns the before option.
|
||||
func (o *ListOptions) GetBefore() string {
|
||||
if o == nil {
|
||||
return ""
|
||||
}
|
||||
return o.Before
|
||||
}
|
||||
|
||||
// ListSubredditOptions defines possible options used when searching for subreddits.
|
||||
type ListSubredditOptions struct {
|
||||
ListOptions
|
||||
|
@ -448,13 +416,6 @@ func addOptions(s string, opt interface{}) (string, error) {
|
|||
return origURL.String(), nil
|
||||
}
|
||||
|
||||
func addQuery(url string, query url.Values) string {
|
||||
if query == nil || len(query) == 0 {
|
||||
return url
|
||||
}
|
||||
return url + "?" + query.Encode()
|
||||
}
|
||||
|
||||
// String is a helper routine that allocates a new string value
|
||||
// to store v and returns a pointer to it.
|
||||
func String(v string) *string {
|
||||
|
|
Loading…
Reference in a new issue