mirror of
https://github.com/rjNemo/rentease.git
synced 2026-06-10 20:56:50 +00:00
add transport
This commit is contained in:
parent
28866ac5fb
commit
f764e1007c
4 changed files with 12 additions and 3 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -25,5 +25,5 @@ Temporary Items
|
|||
.apdisk
|
||||
tmp
|
||||
tmp.pdf
|
||||
.env
|
||||
*.env
|
||||
*templ.txt
|
||||
|
|
|
|||
|
|
@ -48,6 +48,10 @@ func NewHost() *Host {
|
|||
Name: "Port",
|
||||
Price: 20.0,
|
||||
},
|
||||
{
|
||||
Name: "Transport",
|
||||
Price: 20.0,
|
||||
},
|
||||
{
|
||||
Name: "Taxes",
|
||||
Price: 1.5,
|
||||
|
|
|
|||
2
go.mod
2
go.mod
|
|
@ -1,6 +1,6 @@
|
|||
module github.com/rjNemo/rentease
|
||||
|
||||
go 1.22.0
|
||||
go 1.22.1
|
||||
|
||||
require (
|
||||
github.com/a-h/templ v0.2.543
|
||||
|
|
|
|||
7
main.go
7
main.go
|
|
@ -2,6 +2,7 @@ package main
|
|||
|
||||
import (
|
||||
"embed"
|
||||
"flag"
|
||||
"log"
|
||||
"os"
|
||||
"strconv"
|
||||
|
|
@ -19,10 +20,14 @@ import (
|
|||
|
||||
//go:embed assets
|
||||
var static embed.FS
|
||||
var envFile = flag.String("env", ".env", "env file name")
|
||||
|
||||
func init() {
|
||||
flag.Parse()
|
||||
|
||||
if os.Getenv("ENV") != "PROD" {
|
||||
err := godotenv.Load(".env")
|
||||
log.Printf("Loading env file: %q", *envFile)
|
||||
err := godotenv.Load(*envFile)
|
||||
if err != nil {
|
||||
log.Fatalln("Error loading .env file")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue