extract GlobalOptions into internal/global package

Rough steps:
```
mv cmd/restic/global* cmd/restic/secondary_repo* internal/global/
sed -i "s/package main/package global/" internal/global/*.go
Rename "GlobalOptions" to "Options" in internal/global/
Replace everywhere " GlobalOptions" -> " global.Options"
Replace everywhere "\*GlobalOptions" -> " *global.Options"
Make SecondaryRepoOptions public
Make create public
Make version public
```
This commit is contained in:
Michael Eischer
2025-09-28 22:04:48 +02:00
parent 2c677d8db4
commit a816b827cf
74 changed files with 407 additions and 333 deletions

View File

@@ -0,0 +1,14 @@
//go:build !debug && !profile
// +build !debug,!profile
package global
import (
"io"
"github.com/spf13/cobra"
)
func RegisterProfiling(_ *cobra.Command, _ io.Writer) {
// No profiling in release mode
}