Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Configuration
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Jira
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSS
Libraries
Go
Application
Configuration
Compare revisions
v1.11.0 to v1.11.1
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
oss/libraries/go/application/configuration
Select target project
No results found
v1.11.1
Select Git revision
Branches
master
Tags
v1.0.0
v1.0.1
v1.1.0
v1.10.0
v1.11.0
v1.11.1
v1.11.2
v1.11.3
v1.11.4
v1.12.0
v1.13.0
v1.14.0
v1.15.0
v1.16.0
v1.17.1
v1.17.2
v1.17.3
v1.17.4
v1.17.5
v1.17.6
v1.17.7
v1.18.0
v1.18.1
v1.18.2
v1.18.3
v1.19.0
v1.2.0
v1.20.0
v1.20.1
v1.20.2
v1.20.3
v1.20.4
v1.20.5
v1.21.0
v1.22.0
v1.22.1
v1.22.3
v1.22.4
v1.22.5
v1.22.6
v1.22.7
v1.22.8
v1.22.9
v1.3.0
v1.4.0
v1.4.1
v1.4.2
v1.4.3
v1.5.0
v1.6.0
v1.7.0
v1.7.1
v1.8.0
v1.9.0
55 results
Swap
Target
oss/libraries/go/application/configuration
Select target project
oss/libraries/go/application/configuration
1 result
v1.11.0
Select Git revision
Branches
master
Tags
v1.0.0
v1.0.1
v1.1.0
v1.10.0
v1.11.0
v1.11.1
v1.11.2
v1.11.3
v1.11.4
v1.12.0
v1.13.0
v1.14.0
v1.15.0
v1.16.0
v1.17.1
v1.17.2
v1.17.3
v1.17.4
v1.17.5
v1.17.6
v1.17.7
v1.18.0
v1.18.1
v1.18.2
v1.18.3
v1.19.0
v1.2.0
v1.20.0
v1.20.1
v1.20.2
v1.20.3
v1.20.4
v1.20.5
v1.21.0
v1.22.0
v1.22.1
v1.22.3
v1.22.4
v1.22.5
v1.22.6
v1.22.7
v1.22.8
v1.22.9
v1.3.0
v1.4.0
v1.4.1
v1.4.2
v1.4.3
v1.5.0
v1.6.0
v1.7.0
v1.7.1
v1.8.0
v1.9.0
55 results
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (3)
fix monitor directories not files
· 896b5d75
Volker Schukai
authored
2 years ago
Verified
896b5d75
Bump version to 1.11.1
· 33ba162f
Volker Schukai
authored
2 years ago
Verified
33ba162f
Update changelog
· 3bd7d419
Volker Schukai
authored
2 years ago
Verified
3bd7d419
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
CHANGELOG.md
+7
-0
7 additions, 0 deletions
CHANGELOG.md
import.go
+3
-3
3 additions, 3 deletions
import.go
release.json
+1
-1
1 addition, 1 deletion
release.json
settings.go
+1
-1
1 addition, 1 deletion
settings.go
watch.go
+20
-1
20 additions, 1 deletion
watch.go
with
32 additions
and
6 deletions
CHANGELOG.md
View file @
3bd7d419
<a
name=
"v1.11.1"
></a>
## [v1.11.1] - 2022-10-23
### Bug Fixes
-
fix monitor directories not files
<a
name=
"v1.11.0"
></a>
## [v1.11.0] - 2022-10-23
### Add Features
...
...
@@ -113,6 +119,7 @@
<a
name=
"v1.0.0"
></a>
## v1.0.0 - 2022-09-18
[
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.10.0
]:
https://gitlab.schukai.com/oss/libraries/go/application/configuration/compare/v1.9.0...v1.10.0
[
v1.9.0
]:
https://gitlab.schukai.com/oss/libraries/go/application/configuration/compare/v1.8.0...v1.9.0
...
...
This diff is collapsed.
Click to expand it.
import.go
View file @
3bd7d419
...
...
@@ -95,7 +95,7 @@ func (s *Settings[C]) importFiles() {
s
.
fileWatch
.
Lock
()
// new files may have been added
tmpWatchList
:=
make
(
map
[
string
]
string
)
tmpWatchList
:=
make
(
map
[
string
]
bool
)
defer
func
()
{
s
.
fileWatch
.
watchList
=
tmpWatchList
...
...
@@ -123,7 +123,7 @@ func (s *Settings[C]) importFiles() {
s
.
importStream
(
reader
{
s
.
files
.
format
,
r
})
f
.
Close
()
tmpWatchList
[
fn
]
=
fn
tmpWatchList
[
fn
]
=
true
}
...
...
@@ -138,7 +138,7 @@ func (s *Settings[C]) importFiles() {
s
.
importStream
(
reader
{
f
.
format
,
r
})
r
.
Close
()
tmpWatchList
[
f
.
path
]
=
f
.
path
tmpWatchList
[
f
.
path
]
=
true
}
}
...
...
This diff is collapsed.
Click to expand it.
release.json
View file @
3bd7d419
{
"version"
:
"1.11.
0
"
}
{
"version"
:
"1.11.
1
"
}
This diff is collapsed.
Click to expand it.
settings.go
View file @
3bd7d419
...
...
@@ -13,7 +13,7 @@ import (
type
fileWatch
struct
{
sync
.
Mutex
watcher
*
fsnotify
.
Watcher
watchList
map
[
string
]
string
watchList
map
[
string
]
bool
cancelWatch
chan
bool
onWatch
bool
}
...
...
This diff is collapsed.
Click to expand it.
watch.go
View file @
3bd7d419
...
...
@@ -5,6 +5,8 @@ package configuration
import
(
"github.com/fsnotify/fsnotify"
"os"
"path"
)
func
(
s
*
Settings
[
C
])
initWatch
()
*
Settings
[
C
]
{
...
...
@@ -97,7 +99,19 @@ func (s *Settings[C]) Watch() *Settings[C] {
// add all files to the watch list
for
file
:=
range
s
.
fileWatch
.
watchList
{
err
:=
s
.
fileWatch
.
watcher
.
Add
(
file
)
fileInfo
,
err
:=
os
.
Stat
(
file
)
if
err
!=
nil
{
s
.
errors
=
append
(
s
.
errors
,
err
)
continue
}
if
fileInfo
.
IsDir
()
{
err
=
s
.
fileWatch
.
watcher
.
Add
(
file
)
}
else
{
err
=
s
.
fileWatch
.
watcher
.
Add
(
path
.
Dir
(
file
))
}
if
err
!=
nil
{
s
.
errors
=
append
(
s
.
errors
,
err
)
}
...
...
@@ -119,6 +133,11 @@ func (s *Settings[C]) Watch() *Settings[C] {
return
}
_
,
exist
:=
s
.
fileWatch
.
watchList
[
event
.
Name
]
if
!
exist
{
continue
}
if
event
.
Op
&
fsnotify
.
Write
==
fsnotify
.
Write
{
s
.
Import
()
}
else
if
event
.
Op
&
fsnotify
.
Remove
==
fsnotify
.
Remove
{
...
...
This diff is collapsed.
Click to expand it.