Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
fea2d96f
Unverified
Commit
fea2d96f
authored
Sep 27, 2023
by
Ethen Pociask
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[indexer.client] Pass lint
parent
c500a311
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
api.go
indexer/api/api.go
+2
-3
No files found.
indexer/api/api.go
View file @
fea2d96f
...
@@ -24,7 +24,6 @@ const ethereumAddressRegex = `^0x[a-fA-F0-9]{40}$`
...
@@ -24,7 +24,6 @@ const ethereumAddressRegex = `^0x[a-fA-F0-9]{40}$`
// TODO : Structured error responses
// TODO : Structured error responses
type
API
struct
{
type
API
struct
{
log
log
.
Logger
log
log
.
Logger
listener
net
.
Listener
router
*
chi
.
Mux
router
*
chi
.
Mux
serverConfig
config
.
ServerConfig
serverConfig
config
.
ServerConfig
metricsConfig
config
.
ServerConfig
metricsConfig
config
.
ServerConfig
...
@@ -139,9 +138,9 @@ func (a *API) startServer(ctx context.Context) error {
...
@@ -139,9 +138,9 @@ func (a *API) startServer(ctx context.Context) error {
// than the one we requested (e.g. port 0)
// than the one we requested (e.g. port 0)
a
.
serverConfig
.
Port
=
tcpAddr
.
Port
a
.
serverConfig
.
Port
=
tcpAddr
.
Port
http
.
Serve
(
listener
,
server
.
Handler
)
err
=
http
.
Serve
(
listener
,
server
.
Handler
)
if
err
!=
nil
{
if
err
!=
nil
{
a
.
log
.
Error
(
"api server stopped"
,
"err"
,
err
)
a
.
log
.
Error
(
"api server stopped
with error
"
,
"err"
,
err
)
}
else
{
}
else
{
a
.
log
.
Info
(
"api server stopped"
)
a
.
log
.
Info
(
"api server stopped"
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment