doc: Add section about how to change the sftp port

Closes #895
Related to #785
This commit is contained in:
Alexander Neumann
2017-03-25 09:07:50 +01:00
parent c85055bb03
commit 1733b24f9d
2 changed files with 37 additions and 4 deletions
+3 -4
View File
@@ -15,10 +15,9 @@ type Config struct {
// ParseConfig parses the string s and extracts the sftp config. The
// supported configuration formats are sftp://user@host/directory
// (with an optional port sftp://user@host:port/directory) and
// sftp:user@host:directory. The directory will be path Cleaned and
// can be an absolute path if it starts with a '/'
// (e.g. sftp://user@host//absolute and sftp:user@host:/absolute).
// and sftp:user@host:directory. The directory will be path Cleaned and can
// be an absolute path if it starts with a '/' (e.g.
// sftp://user@host//absolute and sftp:user@host:/absolute).
func ParseConfig(s string) (interface{}, error) {
var user, host, dir string
switch {