mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-10-26 12:01:08 +00:00
[GITEA] add GetFile to config provider
(cherry picked from commit88d1b53eea) (cherry picked from commitf63f71afad) (cherry picked from commit1f774145fc) (cherry picked from commit53e637693b) (cherry picked from commit4974cbf10a) (cherry picked from commit554bca7fae) (cherry picked from commit61b8cf83b9) (cherry picked from commitd8bcc6f68c) (cherry picked from commitee04c34072) (cherry picked from commit713153a6d6) (cherry picked from commit1d51dfa510) (cherry picked from commitee7ae29abb) (cherry picked from commitb20ebd8254) (cherry picked from commit2e45c9fdc5) (cherry picked from commit0418f7cebd)
This commit is contained in:
parent
420c57c606
commit
99ad61c41a
1 changed files with 5 additions and 0 deletions
|
|
@ -53,6 +53,7 @@ type ConfigProvider interface {
|
|||
Save() error
|
||||
SaveTo(filename string) error
|
||||
|
||||
GetFile() string
|
||||
DisableSaving()
|
||||
PrepareSaving() (ConfigProvider, error)
|
||||
IsLoadedFromEmpty() bool
|
||||
|
|
@ -258,6 +259,10 @@ func (p *iniConfigProvider) GetSection(name string) (ConfigSection, error) {
|
|||
|
||||
var errDisableSaving = errors.New("this config can't be saved, developers should prepare a new config to save")
|
||||
|
||||
func (p *iniConfigProvider) GetFile() string {
|
||||
return p.file
|
||||
}
|
||||
|
||||
// Save saves the content into file
|
||||
func (p *iniConfigProvider) Save() error {
|
||||
if p.disableSaving {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue