From 1243083831adf5565c47409ea45d4c84d172baaa Mon Sep 17 00:00:00 2001 From: Gusted Date: Sun, 11 Aug 2024 11:37:18 +0200 Subject: [PATCH] cli: Remove `go-shlex` dependency (#9644) --- cmd/syncthing/cli/main.go | 4 ++-- go.mod | 1 - go.sum | 2 -- gui/default/syncthing/core/aboutModalView.html | 1 - 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/cmd/syncthing/cli/main.go b/cmd/syncthing/cli/main.go index 4d9fb5727..82367cc67 100644 --- a/cmd/syncthing/cli/main.go +++ b/cmd/syncthing/cli/main.go @@ -12,7 +12,7 @@ import ( "os" "github.com/alecthomas/kong" - "github.com/flynn-archive/go-shlex" + "github.com/kballard/go-shellquote" "github.com/syncthing/syncthing/cmd/syncthing/cmdutil" "github.com/syncthing/syncthing/lib/config" @@ -67,7 +67,7 @@ func (*stdinCommand) Run() error { fmt.Println("Reading commands from stdin...", args) scanner := bufio.NewScanner(os.Stdin) for scanner.Scan() { - input, err := shlex.Split(scanner.Text()) + input, err := shellquote.Split(scanner.Text()) if err != nil { return fmt.Errorf("parsing input: %w", err) } diff --git a/go.mod b/go.mod index 99be8b149..4a1743f1a 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,6 @@ require ( github.com/ccding/go-stun v0.1.5 github.com/chmduquesne/rollinghash v4.0.0+incompatible github.com/d4l3k/messagediff v1.2.1 - github.com/flynn-archive/go-shlex v0.0.0-20150515145356-3f9db97f8568 github.com/getsentry/raven-go v0.2.0 github.com/go-ldap/ldap/v3 v3.4.8 github.com/gobwas/glob v0.2.3 diff --git a/go.sum b/go.sum index 6d06a095c..1a95e7c56 100644 --- a/go.sum +++ b/go.sum @@ -39,8 +39,6 @@ github.com/d4l3k/messagediff v1.2.1/go.mod h1:Oozbb1TVXFac9FtSIxHBMnBCq2qeH/2KkE github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/flynn-archive/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BMXYYRWTLOJKlh+lOBt6nUQgXAfB7oVIQt5cNreqSLI= -github.com/flynn-archive/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:rZfgFAXFS/z/lEd6LJmf9HVZ1LkgYiHx5pHhV5DR16M= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= diff --git a/gui/default/syncthing/core/aboutModalView.html b/gui/default/syncthing/core/aboutModalView.html index 5ca026b6f..b59b38026 100644 --- a/gui/default/syncthing/core/aboutModalView.html +++ b/gui/default/syncthing/core/aboutModalView.html @@ -54,7 +54,6 @@ Jakob Borg, Audrius Butkevicius, Jesse Lucas, Simon Frei, Tomasz WilczyƄski, Al
  • calmh/xdr, Copyright © 2014 Jakob Borg.
  • chmduquesne/rollinghash, Copyright © 2015 Christophe-Marie Duquesne.
  • d4l3k/messagediff, Copyright © 2015 Tristan Rice.
  • -
  • flynn-archive/go-shlex, Copyright © 2012 Google Inc.
  • gobwas/glob, Copyright © 2016 Sergey Kamardin.
  • gogo/protobuf, Copyright © 2013 The GoGo Authors.
  • golang/groupcache, Copyright © 2013 Google Inc.