Skip to content

Commit

Permalink
re: restructure packages
Browse files Browse the repository at this point in the history
  • Loading branch information
cybardev committed Mar 1, 2024
1 parent ba3ec88 commit 4cdcd6f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions yt.go → cmd/ytgo/yt.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package main
package ytgo

import (
"flag"
"fmt"
"log"
"strings"

"github.com/cybardev/ytgo/internal/app/ytgo"
)

func main() {
Expand All @@ -30,12 +32,12 @@ func main() {
}

// play media from YT or display URL
var v VID
var v ytgo.VID
var err error
if f {
v, err = VIDfromURL(query)
v, err = ytgo.VIDfromURL(query)
} else {
v, err = nthVideo(query, n)
v, err = ytgo.nthVideo(query, n)
}
if err != nil {
log.Fatalln(err)
Expand Down
2 changes: 1 addition & 1 deletion search.go → internal/app/ytgo/search.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package ytgo

import (
"errors"
Expand Down
2 changes: 1 addition & 1 deletion vid.go → internal/app/ytgo/vid.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package ytgo

import (
"net/url"
Expand Down

0 comments on commit 4cdcd6f

Please sign in to comment.