Skip to content

Commit

Permalink
chore: fixing linter errors with gofmt and goimports
Browse files Browse the repository at this point in the history
  • Loading branch information
madflojo committed Apr 7, 2024
1 parent 4852b27 commit 2dac406
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 9 deletions.
1 change: 1 addition & 0 deletions functions/src/data/fetch/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package main

import (
"fmt"

"github.com/tarmac-project/tarmac/pkg/sdk"
)

Expand Down
1 change: 1 addition & 0 deletions functions/src/data/init/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package main

import (
"fmt"

"github.com/tarmac-project/tarmac/pkg/sdk"
)

Expand Down
7 changes: 4 additions & 3 deletions functions/src/data/load/main.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
/*
The purpose of this function is to download the CSV data (by calling another function), parse it, enrich the data, and
The purpose of this function is to download the CSV data (by calling another function), parse it, enrich the data, and
load the contents within the SQL database.
This function is called multiple times throughout the application. It's called by an "init" function and also set
This function is called multiple times throughout the application. It's called by an "init" function and also set
as a scheduled task by itself.
*/
package main

import (
"bytes"
"fmt"
"html"

"github.com/tarmac-project/example-airport-lookup-go/pkg/airport/parsers/csv"
"github.com/tarmac-project/tarmac/pkg/sdk"
"html"
)

type Function struct {
Expand Down
7 changes: 4 additions & 3 deletions functions/src/handlers/lookup/main.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
/*
This function is a lookup request handler function. When a request is received, this function is called and will parse
the incoming request, look up the requested airport from the cache, on cache miss, find the requested data in the
This function is a lookup request handler function. When a request is received, this function is called and will parse
the incoming request, look up the requested airport from the cache, on cache miss, find the requested data in the
database, and provide it back as a response to the request.
*/
package main

import (
"encoding/base64"
"fmt"
"html"

"github.com/tarmac-project/tarmac/pkg/sdk"
"github.com/valyala/fastjson"
"html"
)

// Function is the main function object that will be initialized
Expand Down
1 change: 1 addition & 0 deletions pkg/airport/airport.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package airport

import (
"fmt"

"github.com/enescakir/emoji"
)

Expand Down
3 changes: 2 additions & 1 deletion pkg/airport/parsers/csv/csv.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package csv
import (
"encoding/csv"
"fmt"
"github.com/tarmac-project/example-airport-lookup-go/pkg/airport"
"io"

"github.com/tarmac-project/example-airport-lookup-go/pkg/airport"
)

var (
Expand Down
5 changes: 3 additions & 2 deletions pkg/airport/parsers/csv/csv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package csv

import (
"bytes"
"github.com/enescakir/emoji"
"github.com/tarmac-project/example-airport-lookup-go/pkg/airport"
"reflect"
"testing"

"github.com/enescakir/emoji"
"github.com/tarmac-project/example-airport-lookup-go/pkg/airport"
)

type RecordToAirportTestCase struct {
Expand Down

0 comments on commit 2dac406

Please sign in to comment.