Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

Commit

Permalink
[Update] Fix remaining golint issues reported, should be 100% after this
Browse files Browse the repository at this point in the history
  • Loading branch information
alejoloaiza authored and dgrr committed Jun 11, 2018
1 parent 28f074f commit 6b8d08d
Show file tree
Hide file tree
Showing 27 changed files with 32 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/goinstaExamples.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ import (
"github.com/howeyc/gopass"
)

// UsingSession is used inside InitGoinsta to control if there is already a session created.
var UsingSession bool

// CheckErr is a generic function to validate all errors.
func CheckErr(err error) {
if err != nil {
fmt.Printf("error: %s\n", err)
Expand Down
1 change: 1 addition & 0 deletions goinsta/cmd/account/feed/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"github.com/spf13/cobra"
)

//RootCmd is used as a command line interaction with Instagram Feeds.
var RootCmd = &cobra.Command{
Use: "feed",
Short: "Get downloads all user feed",
Expand Down
1 change: 1 addition & 0 deletions goinsta/cmd/account/followers/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"github.com/spf13/cobra"
)

//RootCmd is used as a command line interaction with Instagram Followers.
var RootCmd = &cobra.Command{
Use: "followers",
Short: "Get account followers",
Expand Down
1 change: 1 addition & 0 deletions goinsta/cmd/account/following/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"github.com/spf13/cobra"
)

//RootCmd is used as a command line interaction with Instagram Following contacts.
var RootCmd = &cobra.Command{
Use: "following",
Short: "Get account following",
Expand Down
1 change: 1 addition & 0 deletions goinsta/cmd/account/info/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"github.com/spf13/cobra"
)

//RootCmd is used as a command line interaction with Instagram Profile info.
var RootCmd = &cobra.Command{
Use: "info",
Short: "Get partial info about your account",
Expand Down
2 changes: 2 additions & 0 deletions goinsta/cmd/account/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@ func init() {
RootCmd.AddCommand(following.RootCmd)
}

//RootCmd is used as a command line interaction with Instagram Account related methods.
var RootCmd = &cobra.Command{
Use: "account",
Short: "Interact with your account",
}

//Execute the method to to start the command execution of Instagram Account related methods.
func Execute() {
if err := RootCmd.Execute(); err != nil {
fmt.Println(err)
Expand Down
1 change: 1 addition & 0 deletions goinsta/cmd/account/stories/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/spf13/cobra"
)

//RootCmd is used as a command line interaction with Instagram Stories.
var RootCmd = &cobra.Command{
Use: "stories",
Short: "Get stories of your account",
Expand Down
1 change: 1 addition & 0 deletions goinsta/cmd/logout/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"github.com/spf13/cobra"
)

//RootCmd is used as a command line interaction with Instagram Logout.
var RootCmd = &cobra.Command{
Use: "logout",
Short: "Logout from your account",
Expand Down
1 change: 1 addition & 0 deletions goinsta/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ var rootCmd = &cobra.Command{
Short: "Command line tool for Instagram",
}

// Execute is called from main as an entrance to the command line interaction tool.
func Execute() {
if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
Expand Down
1 change: 1 addition & 0 deletions goinsta/cmd/search/facebook/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/spf13/cobra"
)

//RootCmd is used as a command line interaction with Instagram Facebook Search.
var RootCmd = &cobra.Command{
Use: "facebook",
Short: "Search facebook users on Instagram",
Expand Down
2 changes: 2 additions & 0 deletions goinsta/cmd/search/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ func init() {
RootCmd.AddCommand(tags.RootCmd)
}

//RootCmd is used as a command line interaction with all Instagram Searches.
var RootCmd = &cobra.Command{
Use: "search",
Short: "Search on Instagram.",
}

//Execute the method to to start the command execution of Instagram Search related methods.
func Execute() {
if err := RootCmd.Execute(); err != nil {
fmt.Println(err)
Expand Down
1 change: 1 addition & 0 deletions goinsta/cmd/search/tags/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/spf13/cobra"
)

//RootCmd is used as a command line interaction with Instagram Tag search.
var RootCmd = &cobra.Command{
Use: "tags",
Short: "Search tags on Instagram",
Expand Down
1 change: 1 addition & 0 deletions goinsta/cmd/search/user/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/spf13/cobra"
)

//RootCmd is used as a command line interaction with Instagram User Search.
var RootCmd = &cobra.Command{
Use: "user",
Short: "Search users on Instagram",
Expand Down
1 change: 1 addition & 0 deletions goinsta/cmd/timeline/feed/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/spf13/cobra"
)

//RootCmd is used as a command line interaction with Instagram Timeline Feed.
var RootCmd = &cobra.Command{
Use: "feed",
Short: "Download feed media",
Expand Down
2 changes: 2 additions & 0 deletions goinsta/cmd/timeline/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ func init() {
RootCmd.AddCommand(stories.RootCmd)
}

//RootCmd is used as a command line interaction with Instagram Timeline related methods.
var RootCmd = &cobra.Command{
Use: "timeline",
Short: "Get timeline feed or stories",
}

//Execute the method to to start the command execution of Instagram Timeline related methods.
func Execute() {
if err := RootCmd.Execute(); err != nil {
fmt.Println(err)
Expand Down
1 change: 1 addition & 0 deletions goinsta/cmd/timeline/stories/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/spf13/cobra"
)

//RootCmd is used as a command line interaction with Instagram Timeline Stories.
var RootCmd = &cobra.Command{
Use: "stories",
Short: "Get stories of a user",
Expand Down
1 change: 1 addition & 0 deletions goinsta/cmd/user/block/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/spf13/cobra"
)

//RootCmd is used as a command line interaction with Instagram Block user method.
var RootCmd = &cobra.Command{
Use: "block",
Short: "Blocks a user",
Expand Down
1 change: 1 addition & 0 deletions goinsta/cmd/user/feed/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"github.com/spf13/cobra"
)

//RootCmd is used as a command line interaction with Instagram user Feed method.
var RootCmd = &cobra.Command{
Use: "feed",
Short: "Get downloads all user feed",
Expand Down
1 change: 1 addition & 0 deletions goinsta/cmd/user/follow/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/spf13/cobra"
)

//RootCmd is used as a command line interaction with Instagram Follow user method.
var RootCmd = &cobra.Command{
Use: "follow",
Short: "Start following a user",
Expand Down
1 change: 1 addition & 0 deletions goinsta/cmd/user/followers/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/spf13/cobra"
)

//RootCmd is used as a command line interaction with Instagram get followers method.
var RootCmd = &cobra.Command{
Use: "followers",
Short: "Get user followers",
Expand Down
1 change: 1 addition & 0 deletions goinsta/cmd/user/following/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/spf13/cobra"
)

//RootCmd is used as a command line interaction with Instagram get user following method.
var RootCmd = &cobra.Command{
Use: "following",
Short: "Get user following",
Expand Down
1 change: 1 addition & 0 deletions goinsta/cmd/user/highlights/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
"github.com/spf13/cobra"
)

//RootCmd is used as a command line interaction with Instagram get user highlight methods.
var RootCmd = &cobra.Command{
Use: "highlights",
Short: "Get highlights of a user",
Expand Down
1 change: 1 addition & 0 deletions goinsta/cmd/user/info/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/spf13/cobra"
)

//RootCmd is used as a command line interaction with Instagram get user info method.
var RootCmd = &cobra.Command{
Use: "info",
Short: "Get partial info about user",
Expand Down
2 changes: 2 additions & 0 deletions goinsta/cmd/user/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@ func init() {
RootCmd.AddCommand(unblock.RootCmd)
}

//RootCmd is used as a command line interaction with Instagram User related methods.
var RootCmd = &cobra.Command{
Use: "user",
Short: "Get downloads specified Instagram user's object.",
}

//Execute the method to to start the command execution of Instagram User related methods.
func Execute() {
if err := RootCmd.Execute(); err != nil {
fmt.Println(err)
Expand Down
1 change: 1 addition & 0 deletions goinsta/cmd/user/stories/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
"github.com/spf13/cobra"
)

//RootCmd is used as a command line interaction with Instagram get user stories method.
var RootCmd = &cobra.Command{
Use: "stories",
Short: "Get stories of a user",
Expand Down
1 change: 1 addition & 0 deletions goinsta/cmd/user/unblock/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/spf13/cobra"
)

//RootCmd is used as a command line interaction with Instagram unblock user method.
var RootCmd = &cobra.Command{
Use: "unblock",
Short: "Unblocks a user",
Expand Down
1 change: 1 addition & 0 deletions goinsta/cmd/user/unfollow/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/spf13/cobra"
)

//RootCmd is used as a command line interaction with Instagram unfollow user method.
var RootCmd = &cobra.Command{
Use: "unfollow",
Short: "Start unfollowing a user",
Expand Down

0 comments on commit 6b8d08d

Please sign in to comment.