Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
webservice
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DevOps (Lecture FB VI)
webservice
Compare revisions
19111cb95c25061ac695a1a185818bc842c24234 to main
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
fb6-wp11-devops/webservice
Select target project
No results found
main
Select Git revision
Swap
Target
masi9606/webservice
Select target project
fb6-wp11-devops/webservice
maha1056/devops-pipeline
ludo8147/webservice
s52888/webservice
masi9606/webservice
kibu5600/webservice
s78689/webservice
s50860/webservice
s92604/devops-webservice
s76867/webservice-devops
s92274/webservice
s80066/webservice
masa1998/webservice
s91190/app-service
s84985/webservice
s75359/webservice
ouch4861/webservice-ws-24-oc
s92274/webservice-msws-24
ewbo4360/webservice
19 results
19111cb95c25061ac695a1a185818bc842c24234
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (3)
README: replace 'tutorials' with 'exercise' due to renaming; fix phrasing
· e5319d45
gjahn
authored
6 months ago
e5319d45
Throw if database password file is empty
· 5f8eacc4
gjahn
authored
3 days ago
5f8eacc4
Bump Go version from 1.21 to 1.24
· 1eff60cb
gjahn
authored
3 days ago
1eff60cb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+2
-2
2 additions, 2 deletions
README.md
configuration/config.go
+6
-1
6 additions, 1 deletion
configuration/config.go
go.mod
+1
-1
1 addition, 1 deletion
go.mod
with
9 additions
and
4 deletions
README.md
View file @
1eff60cb
Webservice
==========
A Go-based simple web service meant to be the subject of any
tutorial
or even used the project work.
A Go-based simple web service meant to be the subject of any
exercise
or even used
in
the project work.
#### Prerequisites:
...
...
This diff is collapsed.
Click to expand it.
configuration/config.go
View file @
1eff60cb
...
...
@@ -69,7 +69,7 @@ func New() ( *Config, error ){
fmt
.
Sprintln
(
"Database password must be a file path"
),
)
}
_
,
err
:=
os
.
Stat
(
cfg
.
DatabasePassword
)
fileInfo
,
err
:=
os
.
Stat
(
cfg
.
DatabasePassword
)
if
err
!=
nil
{
if
errors
.
Is
(
err
,
os
.
ErrNotExist
){
return
nil
,
errors
.
New
(
...
...
@@ -80,6 +80,11 @@ func New() ( *Config, error ){
fmt
.
Sprintln
(
"Database password file not accessible"
),
)
}
if
fileInfo
.
Size
()
<=
0
{
return
nil
,
errors
.
New
(
fmt
.
Sprintln
(
"Database password file is empty"
),
)
}
}
if
len
(
cfg
.
FontColor
)
>=
1
{
...
...
This diff is collapsed.
Click to expand it.
go.mod
View file @
1eff60cb
module webservice
go 1.2
1
go 1.2
4
require (
github.com/caarlos0/env/v9
v9.0.0
...
...
This diff is collapsed.
Click to expand it.