aboutsummaryrefslogtreecommitdiff
path: root/internal/service/rsync.go
diff options
context:
space:
mode:
authorSlack Coder <slackcoder@server.ky>2024-10-02 16:49:36 -0500
committerSlack Coder <slackcoder@server.ky>2024-10-02 17:01:48 -0500
commit2597c03d1555e00dec59830b7de75e7090208e05 (patch)
tree5642202b4621ea722ee85b322d79bbad17894026 /internal/service/rsync.go
parentb81d017b42cc814e603de2b49e4b78362ae73f2a (diff)
downloadmirror-2597c03d1555e00dec59830b7de75e7090208e05.tar.xz
config: Use TOML
TOML is simple for users, and it is used in notably projects like rustlang. It also provides comments!
Diffstat (limited to 'internal/service/rsync.go')
-rw-r--r--internal/service/rsync.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/service/rsync.go b/internal/service/rsync.go
index 8298589..c9c7e92 100644
--- a/internal/service/rsync.go
+++ b/internal/service/rsync.go
@@ -3,9 +3,10 @@ package service
import (
"bytes"
"errors"
- "net/url"
"os/exec"
"strings"
+
+ "git.server.ky/slackcoder/mirror/internal"
)
var rsyncOpts = []string{
@@ -19,7 +20,7 @@ var rsyncOpts = []string{
"--times",
}
-func Rsync(dst *url.URL, src *url.URL) error {
+func Rsync(dst *internal.URL, src *internal.URL) error {
src2 := *src
if !strings.HasSuffix(src2.Path, "/.") {
src2.Path = src2.Path + "/."