Skip to content

Commit

Permalink
[FIX] fix duplicated params;
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhakhongir R. committed Sep 19, 2024
1 parent 9afbba1 commit 65b4cee
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
8 changes: 1 addition & 7 deletions docx_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,13 @@ package main

import (
"github.com/unidoc/unioffice/document"
"github.com/unidoc/unioffice/measurement"

Check failure on line 5 in docx_generator.go

View workflow job for this annotation

GitHub Actions / lint

"github.com/unidoc/unioffice/measurement" imported and not used
"github.com/joho/godotenv"

Check failure on line 6 in docx_generator.go

View workflow job for this annotation

GitHub Actions / lint

"github.com/joho/godotenv" imported and not used
"log"

Check failure on line 7 in docx_generator.go

View workflow job for this annotation

GitHub Actions / lint

"log" imported and not used
"os"
"strconv"
)

func loadEnv() {
err := godotenv.Load()
if err != nil {
log.Fatalf("Error loading .env file")
}
}

func generateResumeDocx(resume Resume, filename string) error {
loadEnv()

Expand Down
13 changes: 13 additions & 0 deletions env_loader.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package main

import (
"github.com/joho/godotenv"
"log"
)

func loadEnv() {
err := godotenv.Load()
if err != nil {
log.Fatalf("Error loading .env file")
}
}
7 changes: 0 additions & 7 deletions pdf_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ import (
"strconv"
)

func loadEnv() {
err := godotenv.Load()
if err != nil {
log.Fatalf("Error loading .env file")
}
}

func generateResumePDF(resume Resume, filename string) error {
loadEnv()

Expand Down

0 comments on commit 65b4cee

Please sign in to comment.