Change go module name

This commit is contained in:
Alf Sebastian Houge
2023-02-16 22:35:03 +01:00
parent a8c85bcd7d
commit 9da21b2192
26 changed files with 69 additions and 54 deletions

View File

@@ -7,7 +7,8 @@ import (
"os"
"time"
"github.com/akhilrex/hammond/db"
"hammond/db"
"github.com/dgrijalva/jwt-go"
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding"

View File

@@ -7,10 +7,11 @@ import (
"os"
"strings"
"github.com/akhilrex/hammond/common"
"github.com/akhilrex/hammond/db"
"github.com/akhilrex/hammond/models"
"github.com/akhilrex/hammond/service"
"hammond/common"
"hammond/db"
"hammond/models"
"hammond/service"
"github.com/dgrijalva/jwt-go"
"github.com/gin-gonic/gin"
)

View File

@@ -5,10 +5,11 @@ import (
"net/http"
"os"
"github.com/akhilrex/hammond/common"
"github.com/akhilrex/hammond/db"
"github.com/akhilrex/hammond/models"
"github.com/akhilrex/hammond/service"
"hammond/common"
"hammond/db"
"hammond/models"
"hammond/service"
"github.com/gin-gonic/gin"
)

View File

@@ -4,7 +4,8 @@ import (
"net/http"
"strconv"
"github.com/akhilrex/hammond/service"
"hammond/service"
"github.com/gin-gonic/gin"
)

View File

@@ -3,10 +3,11 @@ package controllers
import (
"net/http"
"github.com/akhilrex/hammond/common"
"github.com/akhilrex/hammond/db"
"github.com/akhilrex/hammond/models"
"github.com/akhilrex/hammond/service"
"hammond/common"
"hammond/db"
"hammond/models"
"hammond/service"
"github.com/gin-gonic/gin"
)

View File

@@ -5,7 +5,8 @@ import (
"os"
"strings"
"github.com/akhilrex/hammond/db"
"hammond/db"
"github.com/dgrijalva/jwt-go"
"github.com/dgrijalva/jwt-go/request"
"github.com/gin-gonic/gin"

View File

@@ -3,9 +3,10 @@ package controllers
import (
"net/http"
"github.com/akhilrex/hammond/common"
"github.com/akhilrex/hammond/models"
"github.com/akhilrex/hammond/service"
"hammond/common"
"hammond/models"
"hammond/service"
"github.com/gin-gonic/gin"
)

View File

@@ -4,10 +4,11 @@ import (
"fmt"
"net/http"
"github.com/akhilrex/hammond/common"
"github.com/akhilrex/hammond/db"
"github.com/akhilrex/hammond/models"
"github.com/akhilrex/hammond/service"
"hammond/common"
"hammond/db"
"hammond/models"
"hammond/service"
"github.com/gin-gonic/gin"
)

View File

@@ -3,10 +3,11 @@ package controllers
import (
"net/http"
"github.com/akhilrex/hammond/common"
"github.com/akhilrex/hammond/db"
"github.com/akhilrex/hammond/models"
"github.com/akhilrex/hammond/service"
"hammond/common"
"hammond/db"
"hammond/models"
"hammond/service"
"github.com/gin-gonic/gin"
)

View File

@@ -4,9 +4,10 @@ import (
"errors"
"net/http"
"github.com/akhilrex/hammond/common"
"github.com/akhilrex/hammond/models"
"github.com/akhilrex/hammond/service"
"hammond/common"
"hammond/models"
"hammond/service"
"github.com/gin-gonic/gin"
)

View File

@@ -1,4 +1,4 @@
module github.com/akhilrex/hammond
module hammond
go 1.16

View File

@@ -5,9 +5,10 @@ import (
"log"
"os"
"github.com/akhilrex/hammond/controllers"
"github.com/akhilrex/hammond/db"
"github.com/akhilrex/hammond/service"
"hammond/controllers"
"hammond/db"
"hammond/service"
"github.com/gin-contrib/location"
"github.com/gin-gonic/contrib/static"
"github.com/gin-gonic/gin"

View File

@@ -3,7 +3,7 @@ package models
import (
"time"
"github.com/akhilrex/hammond/db"
"hammond/db"
)
type CreateAlertModel struct {

View File

@@ -1,6 +1,6 @@
package models
import "github.com/akhilrex/hammond/db"
import "hammond/db"
type LoginResponse struct {
Name string `json:"name"`

View File

@@ -1,6 +1,6 @@
package models
import "github.com/akhilrex/hammond/db"
import "hammond/db"
type UpdateSettingModel struct {
Currency string `json:"currency" form:"currency" query:"currency"`

View File

@@ -4,7 +4,7 @@ import (
"encoding/json"
"time"
"github.com/akhilrex/hammond/db"
"hammond/db"
)
type MileageModel struct {

View File

@@ -3,7 +3,8 @@ package models
import (
"time"
"github.com/akhilrex/hammond/db"
"hammond/db"
_ "github.com/go-playground/validator/v10"
)

View File

@@ -4,8 +4,8 @@ import (
"errors"
"time"
"github.com/akhilrex/hammond/db"
"github.com/akhilrex/hammond/models"
"hammond/db"
"hammond/models"
)
func CreateAlert(model models.CreateAlertModel, vehicleId, userId string) (*db.VehicleAlert, error) {

View File

@@ -8,7 +8,7 @@ import (
"strings"
"time"
"github.com/akhilrex/hammond/db"
"hammond/db"
)
func DrivvoParseExpenses(content []byte, user *db.User, vehicle *db.Vehicle) ([]db.Expense, []string) {

View File

@@ -13,9 +13,10 @@ import (
"strconv"
"time"
"github.com/akhilrex/hammond/db"
"github.com/akhilrex/hammond/internal/sanitize"
"github.com/akhilrex/hammond/models"
"hammond/db"
"hammond/internal/sanitize"
"hammond/models"
uuid "github.com/satori/go.uuid"
)

View File

@@ -7,7 +7,8 @@ import (
"strconv"
"time"
"github.com/akhilrex/hammond/db"
"hammond/db"
"github.com/leekchan/accounting"
)

View File

@@ -3,7 +3,7 @@ package service
import (
"bytes"
"github.com/akhilrex/hammond/db"
"hammond/db"
)
func WriteToDB(fillups []db.Fillup, expenses []db.Expense) []string {

View File

@@ -1,7 +1,7 @@
package service
import (
"github.com/akhilrex/hammond/db"
"hammond/db"
)
func CanInitializeSystem() (bool, error) {

View File

@@ -4,9 +4,9 @@ import (
"sort"
"time"
"github.com/akhilrex/hammond/common"
"github.com/akhilrex/hammond/db"
"github.com/akhilrex/hammond/models"
"hammond/common"
"hammond/db"
"hammond/models"
)
func GetMileageByVehicleId(vehicleId string, since time.Time, mileageOption string) (mileage []models.MileageModel, err error) {

View File

@@ -3,8 +3,8 @@ package service
import (
"strings"
"github.com/akhilrex/hammond/db"
"github.com/akhilrex/hammond/models"
"hammond/db"
"hammond/models"
)
func CreateUser(userModel *models.RegisterRequest, role db.Role) error {

View File

@@ -3,8 +3,9 @@ package service
import (
"fmt"
"github.com/akhilrex/hammond/db"
"github.com/akhilrex/hammond/models"
"hammond/db"
"hammond/models"
"gorm.io/gorm"
"gorm.io/gorm/clause"
)