docs: fix typos in comments and messages

This commit is contained in:
yy
2026-01-18 20:48:33 +01:00
committed by GitHub
parent 9ec918f137
commit b728929f44
16 changed files with 18 additions and 18 deletions
+1 -1
View File
@@ -764,7 +764,7 @@ func SetCacheDir(path string) (err error) {
//
// To override the default we therefore set environment variable TMPDIR
// on Unix systems, and both TMP and TEMP on Windows (they are almost exclusively
// aliases for the same path, and programs may refer to to either of them).
// aliases for the same path, and programs may refer to either of them).
// This should make all libraries and forked processes use the same.
func SetTempDir(path string) (err error) {
var tempDir string
+2 -2
View File
@@ -31,7 +31,7 @@ func camelToSnake(in string) string {
//
// Builtin types are expected to be encoding as their natural
// stringificatons as produced by fmt.Sprint except for []string which
// is expected to be encoded a a CSV with empty array encoded as "".
// is expected to be encoded as a CSV with empty array encoded as "".
//
// Any other types are expected to be encoded by their String()
// methods and decoded by their `Set(s string) error` methods.
@@ -93,7 +93,7 @@ func StringToInterface(def any, in string) (newValue any, err error) {
//
// Builtin types are expected to be encoding as their natural
// stringificatons as produced by fmt.Sprint except for []string which
// is expected to be encoded a a CSV with empty array encoded as "".
// is expected to be encoded as a CSV with empty array encoded as "".
//
// Any other types are expected to be encoded by their String()
// methods and decoded by their `Set(s string) error` methods.
+1 -1
View File
@@ -180,7 +180,7 @@ func Decrypt(b io.ReadSeeker) (io.Reader, error) {
// GetPasswordCommand gets the password using the --password-command setting
//
// If the the --password-command flag was not in use it returns "", nil
// If the --password-command flag was not in use it returns "", nil
func GetPasswordCommand(ctx context.Context) (pass string, err error) {
ci := fs.GetConfig(ctx)
if len(ci.PasswordCommand) == 0 {
+1 -1
View File
@@ -225,7 +225,7 @@ func fromTypes(set Set) (map[Type]hash.Hash, error) {
// single multiwriter, where one write will update all
// the hashers.
func toMultiWriter(h map[Type]hash.Hash) io.Writer {
// Convert to to slice
// Convert to slice
var w = make([]io.Writer, 0, len(h))
for _, v := range h {
w = append(w, v)
+1 -1
View File
@@ -79,7 +79,7 @@ type Options struct {
File string `config:"log_file"` // Log everything to this file
MaxSize fs.SizeSuffix `config:"log_file_max_size"` // Max size of log file
MaxBackups int `config:"log_file_max_backups"` // Max backups of log file
MaxAge fs.Duration `config:"log_file_max_age"` // Max age of of log file
MaxAge fs.Duration `config:"log_file_max_age"` // Max age of log file
Compress bool `config:"log_file_compress"` // Set to compress log file
Format logFormat `config:"log_format"` // Comma separated list of log format options
UseSyslog bool `config:"syslog"` // Use Syslog for logging
+2 -2
View File
@@ -806,7 +806,7 @@ func TestSyncBasedOnCheckSum(t *testing.T) {
// Create a file and sync it. Change the last modified date and the
// file contents but not the size. If we're only doing sync by size
// only, we expect nothing to to be transferred on the second sync.
// only, we expect nothing to be transferred on the second sync.
func TestSyncSizeOnly(t *testing.T) {
ctx := context.Background()
ctx, ci := fs.AddConfig(ctx)
@@ -843,7 +843,7 @@ func TestSyncSizeOnly(t *testing.T) {
}
// Create a file and sync it. Keep the last modified date but change
// the size. With --ignore-size we expect nothing to to be
// the size. With --ignore-size we expect nothing to be
// transferred on the second sync.
func TestSyncIgnoreSize(t *testing.T) {
ctx := context.Background()
+1 -1
View File
@@ -328,7 +328,7 @@ type Flagger interface {
// satisfy as non-pointers
//
// These are from pflag.Value and need to be tested against
// non-pointer value due the the way the backend flags are inserted
// non-pointer value due to the way the backend flags are inserted
// into the flags.
type FlaggerNP interface {
String() string