Code refactoring and bump deps
This commit is contained in:
9
main.go
9
main.go
@@ -1,7 +1,6 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"embed"
|
||||
"flag"
|
||||
"io/fs"
|
||||
@@ -11,8 +10,6 @@ import (
|
||||
"github.com/marcopeocchi/yt-dlp-web-ui/server/config"
|
||||
)
|
||||
|
||||
type ContextKey interface{}
|
||||
|
||||
var (
|
||||
port int
|
||||
downloadPath string
|
||||
@@ -48,9 +45,5 @@ func main() {
|
||||
cfg.DownloadPath(downloadPath)
|
||||
cfg.DownloaderPath(downloaderPath)
|
||||
|
||||
ctx := context.Background()
|
||||
ctx = context.WithValue(ctx, ContextKey("port"), port)
|
||||
ctx = context.WithValue(ctx, ContextKey("frontend"), frontend)
|
||||
|
||||
server.RunBlocking(ctx)
|
||||
server.RunBlocking(port, frontend)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user