Commit 8932648c authored by Alexis POYEN's avatar Alexis POYEN
Browse files

Fix golang linting with comments

parent 847ef67c
Pipeline #4816 failed with stages
in 3 minutes and 19 seconds
......@@ -3,8 +3,6 @@ module forge.grandlyon.com/apoyen/sdk-go
go 1.14
require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/golang/protobuf v1.3.5 // indirect
github.com/jinzhu/gorm v1.9.12
github.com/kr/pretty v0.2.0 // indirect
github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect
......@@ -14,6 +12,4 @@ require (
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e // indirect
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
golang.org/x/sys v0.0.0-20200327173247-9dae0f8f5775 // indirect
google.golang.org/appengine v1.6.5 // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
)
......@@ -9,6 +9,7 @@ import (
"forge.grandlyon.com/apoyen/sdk-go/pkg/auth"
)
// HandleBankAccounts handle API call on BankAccounts
func (d *DataHandler) HandleBankAccounts(w http.ResponseWriter, r *http.Request) {
id, _ := strconv.Atoi(strings.TrimPrefix(r.URL.Path, "/api/BankAccounts/"))
switch method := r.Method; method {
......
......@@ -9,6 +9,7 @@ import (
"forge.grandlyon.com/apoyen/sdk-go/pkg/auth"
)
// HandleBankers handle API calls on Bankers
func (d *DataHandler) HandleBankers(w http.ResponseWriter, r *http.Request) {
id, _ := strconv.Atoi(strings.TrimPrefix(r.URL.Path, "/api/UserBankers/"))
switch method := r.Method; method {
......
......@@ -9,7 +9,6 @@ import (
"github.com/jinzhu/gorm"
// Needed for sqlite
_ "github.com/jinzhu/gorm/dialects/sqlite"
)
......@@ -84,13 +83,14 @@ type BankAccount struct {
UpdatedAt time.Time `json:"-"`
DeletedAt *time.Time `json:"-"`
Number string
UserClientID uint64
UserClientID uint
Type string
Amount int
BankOverdraft int
Operations []Operation `gorm:"foreignkey:Debtor"`
}
// Operation reprensent a bank transaction registered in a BankAccount
type Operation struct {
ID uint `gorm:"primary_key"`
Debtor uint
......
......@@ -10,6 +10,7 @@ import (
"forge.grandlyon.com/apoyen/sdk-go/pkg/auth"
)
// HandleOperations handle API calls on Operations
func (d *DataHandler) HandleOperations(w http.ResponseWriter, r *http.Request) {
id, _ := strconv.Atoi(strings.TrimPrefix(r.URL.Path, "/api/Operations/"))
switch method := r.Method; method {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment