Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bridgestrap
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hanneloresx
bridgestrap
Commits
37d7978e
Verified
Commit
37d7978e
authored
4 years ago
by
Philipp Winter
Browse files
Options
Downloads
Patches
Plain Diff
Introduce semantic versioning.
...and start with version 0.0.1.
parent
1acc2710
No related branches found
Branches containing commit
Tags
1.9.8
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
main.go
+13
-1
13 additions, 1 deletion
main.go
with
13 additions
and
1 deletion
main.go
+
13
−
1
View file @
37d7978e
...
...
@@ -16,6 +16,12 @@ import (
"github.com/gorilla/mux"
)
const
(
// BridgestrapVersion specifies bridgestrap's version. The version number
// is based on semantic versioning: https://semver.org
BridgestrapVersion
=
"0.0.1"
)
type
Route
struct
{
Name
string
Method
string
...
...
@@ -109,7 +115,7 @@ func main() {
var
err
error
var
addr
string
var
web
,
printCache
,
unsafeLogging
bool
var
web
,
printCache
,
unsafeLogging
,
showVersion
bool
var
certFilename
,
keyFilename
string
var
cacheFile
string
var
templatesDir
string
...
...
@@ -119,6 +125,7 @@ func main() {
flag
.
BoolVar
(
&
web
,
"web"
,
false
,
"Enable the web interface (in addition to the JSON API)."
)
flag
.
BoolVar
(
&
printCache
,
"print-cache"
,
false
,
"Print the given cache file and exit."
)
flag
.
BoolVar
(
&
unsafeLogging
,
"unsafe"
,
false
,
"Don't scrub IP addresses in log messages."
)
flag
.
BoolVar
(
&
showVersion
,
"version"
,
false
,
"Print bridgestrap's version and exit."
)
flag
.
StringVar
(
&
certFilename
,
"cert"
,
""
,
"TLS certificate file."
)
flag
.
StringVar
(
&
keyFilename
,
"key"
,
""
,
"TLS private key file."
)
flag
.
StringVar
(
&
cacheFile
,
"cache"
,
"bridgestrap-cache.bin"
,
"Cache file that contains test results."
)
...
...
@@ -126,6 +133,11 @@ func main() {
flag
.
IntVar
(
&
numSecs
,
"seconds"
,
0
,
"Number of seconds after two subsequent requests are handled."
)
flag
.
Parse
()
if
showVersion
{
fmt
.
Printf
(
"bridgestrap version %s
\n
"
,
BridgestrapVersion
)
return
}
var
logOutput
io
.
Writer
=
os
.
Stderr
// Send the log output through our scrubber first.
if
!
printCache
&&
!
unsafeLogging
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment