Skip to content

Commit

Permalink
Automatically trim / from url, rm main.go from .gitignore (#102)
Browse files Browse the repository at this point in the history
* Trim leading slashes from -server flag

* rm main.go from .gitignore

---------

Co-authored-by: Erikas <erkexzcx@users.noreply.github.com>
  • Loading branch information
erkexzcx and erkexzcx committed Dec 15, 2023
1 parent eb50788 commit 0e729db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -4,7 +4,6 @@ immich-go
.vscode/launch.json
.vscode/settings.json
immich-go
main.go

!readme.md

Expand Down
3 changes: 3 additions & 0 deletions main.go
Expand Up @@ -7,6 +7,7 @@ import (
"fmt"
"os"
"os/signal"
"strings"

"github.com/simulot/immich-go/cmdduplicate"
"github.com/simulot/immich-go/cmdmetadata"
Expand Down Expand Up @@ -94,6 +95,8 @@ func Run(ctx context.Context, log *logger.Log) (*logger.Log, error) {
flag.StringVar(&app.TimeZone, "time-zone", "", "Override the system time zone")
flag.Parse()

app.Server = strings.TrimSuffix(app.Server, "/")

_, err = tzone.SetLocal(app.TimeZone)
if err != nil {
return log, err
Expand Down

0 comments on commit 0e729db

Please sign in to comment.