Skip to content

Commit

Permalink
Merge pull request #36 from NikhilSharma03/lint_fix
Browse files Browse the repository at this point in the history
fix: lint issues
  • Loading branch information
NikhilSharma03 authored Dec 27, 2023
2 parents e766d69 + b0df8b9 commit e9ea661
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 32 deletions.
6 changes: 3 additions & 3 deletions cli/cmd/expense_get.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cmd
import (
"encoding/json"
"fmt"
"io/ioutil"
"io"
"log"
"net/http"
"os"
Expand All @@ -30,7 +30,7 @@ var expGetCmd = &cobra.Command{
Short: "Get single transaction details",
Long: `
The get command is used to get single transaction details
Example:
okane expense get --id/-I {expenseID}
`,
Expand Down Expand Up @@ -58,7 +58,7 @@ Example:
if err != nil {
log.Fatalf(err.Error())
}
body, err := ioutil.ReadAll(res.Body)
body, err := io.ReadAll(res.Body)
if err != nil {
log.Fatalf(err.Error())
}
Expand Down
8 changes: 4 additions & 4 deletions cli/cmd/expense_history.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cmd
import (
"encoding/json"
"fmt"
"io/ioutil"
"io"
"log"
"net/http"
"os"
Expand Down Expand Up @@ -45,9 +45,9 @@ var expHistoryCmd = &cobra.Command{
Short: "Get transaction history",
Long: `
The history command is used to get transaction history
Example:
okane expense history
okane expense history
`,
Run: func(cmd *cobra.Command, args []string) {
// Check if user is logged in
Expand All @@ -68,7 +68,7 @@ Example:
if err != nil {
log.Fatalf(err.Error())
}
body, err := ioutil.ReadAll(res.Body)
body, err := io.ReadAll(res.Body)
if err != nil {
log.Fatalf(err.Error())
}
Expand Down
4 changes: 2 additions & 2 deletions cli/cmd/expense_new.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"io"
"log"
"net/http"
"os"
Expand Down Expand Up @@ -172,7 +172,7 @@ Example:
if err != nil {
log.Fatalf(err.Error())
}
body, err = ioutil.ReadAll(res.Body)
body, err = io.ReadAll(res.Body)
if err != nil {
log.Fatalf(err.Error())
}
Expand Down
6 changes: 3 additions & 3 deletions cli/cmd/expense_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"io"
"log"
"net/http"
"os"
Expand Down Expand Up @@ -59,7 +59,7 @@ Example:
if err != nil {
log.Fatalf(err.Error())
}
body, err := ioutil.ReadAll(res.Body)
body, err := io.ReadAll(res.Body)
if err != nil {
log.Fatalf(err.Error())
}
Expand Down Expand Up @@ -218,7 +218,7 @@ Example:
if err != nil {
log.Fatalf(err.Error())
}
body, err = ioutil.ReadAll(res.Body)
body, err = io.ReadAll(res.Body)
if err != nil {
log.Fatalf(err.Error())
}
Expand Down
8 changes: 4 additions & 4 deletions cli/cmd/user_balance.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cmd
import (
"encoding/json"
"fmt"
"io/ioutil"
"io"
"log"
"net/http"
"os"
Expand Down Expand Up @@ -41,9 +41,9 @@ var balanceCmd = &cobra.Command{
Short: "Shows user balance",
Long: `
The balance command is used to see current login user balance
Example:
okane user balance
okane user balance
`,
Run: func(cmd *cobra.Command, args []string) {
// Check if user has already login
Expand Down Expand Up @@ -87,7 +87,7 @@ Example:
if err != nil {
log.Fatalf(err.Error())
}
body, err := ioutil.ReadAll(res.Body)
body, err := io.ReadAll(res.Body)
if err != nil {
log.Fatalf(err.Error())
}
Expand Down
8 changes: 4 additions & 4 deletions cli/cmd/user_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cmd
import (
"encoding/json"
"fmt"
"io/ioutil"
"io"
"log"
"net/http"
"os"
Expand All @@ -25,9 +25,9 @@ var deleteCmd = &cobra.Command{
Short: "Delete user",
Long: `
The delete command is used to delete the current login user
Example:
okane user delete
okane user delete
`,
Run: func(cmd *cobra.Command, args []string) {
// Check if user is login
Expand Down Expand Up @@ -71,7 +71,7 @@ Example:
if err != nil {
log.Fatalf(err.Error())
}
body, err := ioutil.ReadAll(res.Body)
body, err := io.ReadAll(res.Body)
if err != nil {
log.Fatalf(err.Error())
}
Expand Down
8 changes: 4 additions & 4 deletions cli/cmd/user_login.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cmd
import (
"encoding/json"
"fmt"
"io/ioutil"
"io"
"log"
"net/http"
"os"
Expand Down Expand Up @@ -37,9 +37,9 @@ var loginCmd = &cobra.Command{
Short: "Login as a user",
Long: `
The login command is used to login as a user
Example:
okane user login
okane user login
`,
Run: func(cmd *cobra.Command, args []string) {
// Getting user email
Expand Down Expand Up @@ -94,7 +94,7 @@ Example:
if err != nil {
log.Fatalf(err.Error())
}
body, err := ioutil.ReadAll(res.Body)
body, err := io.ReadAll(res.Body)
if err != nil {
log.Fatalf(err.Error())
}
Expand Down
8 changes: 4 additions & 4 deletions cli/cmd/user_new.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"io"
"log"
"net/http"
"os"
Expand Down Expand Up @@ -41,9 +41,9 @@ var newCmd = &cobra.Command{
Short: "Create a new user",
Long: `
The new command is used to create a new user
Example:
okane user new
okane user new
`,
Run: func(cmd *cobra.Command, args []string) {
// Getting user name
Expand Down Expand Up @@ -113,7 +113,7 @@ Example:
}
defer resp.Body.Close()

body, err = ioutil.ReadAll(resp.Body)
body, err = io.ReadAll(resp.Body)
if err != nil {
log.Fatalf(err.Error())
}
Expand Down
8 changes: 4 additions & 4 deletions cli/cmd/user_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"io"
"log"
"net/http"
"os"
Expand Down Expand Up @@ -32,9 +32,9 @@ var updateCmd = &cobra.Command{
Short: "Update user details",
Long: `
The update command is used to update current login user details
Example:
okane user update
okane user update
`,
Run: func(cmd *cobra.Command, args []string) {
// Check if user is login
Expand Down Expand Up @@ -96,7 +96,7 @@ Example:
if err != nil {
log.Fatalf(err.Error())
}
body, err = ioutil.ReadAll(res.Body)
body, err = io.ReadAll(res.Body)
if err != nil {
log.Fatalf(err.Error())
}
Expand Down

0 comments on commit e9ea661

Please sign in to comment.