Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • oss/libraries/go/application/configuration
1 result
Select Git revision
Show changes
Commits on Source (3)
<a name="v1.11.3"></a>
## [v1.11.3] - 2022-10-23
### Bug Fixes
- fix watchlist was empty
<a name="v1.11.2"></a> <a name="v1.11.2"></a>
## [v1.11.2] - 2022-10-23 ## [v1.11.2] - 2022-10-23
### Bug Fixes ### Bug Fixes
...@@ -125,6 +131,7 @@ ...@@ -125,6 +131,7 @@
<a name="v1.0.0"></a> <a name="v1.0.0"></a>
## v1.0.0 - 2022-09-18 ## v1.0.0 - 2022-09-18
[v1.11.3]: https://gitlab.schukai.com/oss/libraries/go/application/configuration/compare/v1.11.2...v1.11.3
[v1.11.2]: https://gitlab.schukai.com/oss/libraries/go/application/configuration/compare/v1.11.1...v1.11.2 [v1.11.2]: https://gitlab.schukai.com/oss/libraries/go/application/configuration/compare/v1.11.1...v1.11.2
[v1.11.1]: https://gitlab.schukai.com/oss/libraries/go/application/configuration/compare/v1.11.0...v1.11.1 [v1.11.1]: https://gitlab.schukai.com/oss/libraries/go/application/configuration/compare/v1.11.0...v1.11.1
[v1.11.0]: https://gitlab.schukai.com/oss/libraries/go/application/configuration/compare/v1.10.0...v1.11.0 [v1.11.0]: https://gitlab.schukai.com/oss/libraries/go/application/configuration/compare/v1.10.0...v1.11.0
......
...@@ -132,7 +132,6 @@ func (s *Settings[C]) importFiles() { ...@@ -132,7 +132,6 @@ func (s *Settings[C]) importFiles() {
s.importStream(reader{f.format, r}) s.importStream(reader{f.format, r})
r.Close() r.Close()
} }
} }
......
{"version":"1.11.2"} {"version":"1.11.3"}
...@@ -62,9 +62,30 @@ func (s *Settings[C]) StopWatching() *Settings[C] { ...@@ -62,9 +62,30 @@ func (s *Settings[C]) StopWatching() *Settings[C] {
return s return s
} }
func (s *Settings[C]) buildWatchList() *Settings[C] {
s.fileWatch.Lock()
defer s.fileWatch.Unlock()
s.fileWatch.watchList = make(map[string]bool)
for _, d := range s.files.directories {
fn := path.Join(d, s.files.name+s.files.format.Extension())
s.fileWatch.watchList[fn] = true
}
for _, f := range s.files.files {
s.fileWatch.watchList[f.path] = true
}
return s
}
// Watch the given file for changes // Watch the given file for changes
func (s *Settings[C]) Watch() *Settings[C] { func (s *Settings[C]) Watch() *Settings[C] {
s.buildWatchList()
s.fileWatch.Lock() s.fileWatch.Lock()
defer s.fileWatch.Unlock() defer s.fileWatch.Unlock()
......