Skip to content

Commit 03fb469

Browse files
committed
Apply gofmt, fix CI issues
1 parent e99b9b8 commit 03fb469

File tree

3 files changed

+26
-26
lines changed

3 files changed

+26
-26
lines changed

config.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ func ReadConfig() (Config, error) {
4141

4242
// Config is the main config for Octyne.
4343
type Config struct {
44-
Port uint16 `json:"port"`
45-
UnixSocket UnixSocketConfig `json:"unixSocket"`
46-
HTTPS HTTPSConfig `json:"https"`
47-
Redis RedisConfig `json:"redis"`
48-
Logging LoggingConfig `json:"logging"`
49-
WebUI WebUIConfig `json:"webUI"`
50-
Servers map[string]ServerConfig `json:"servers"`
44+
Port uint16 `json:"port"`
45+
UnixSocket UnixSocketConfig `json:"unixSocket"`
46+
HTTPS HTTPSConfig `json:"https"`
47+
Redis RedisConfig `json:"redis"`
48+
Logging LoggingConfig `json:"logging"`
49+
WebUI WebUIConfig `json:"webUI"`
50+
Servers map[string]ServerConfig `json:"servers"`
5151
}
5252

5353
// WebUIConfig contains whether or not the Web UI is enabled.

connector.go

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -155,25 +155,25 @@ func InitializeConnector(config *Config) *Connector {
155155
http.Handle("/", http.FileServer(ecthelionFileSystem{http.FS(Ecthelion)}))
156156
}
157157

158-
http.Handle(prefix + "/login", WrapEndpointWithCtx(connector, loginEndpoint))
159-
http.Handle(prefix + "/logout", WrapEndpointWithCtx(connector, logoutEndpoint))
160-
http.Handle(prefix + "/ott", WrapEndpointWithCtx(connector, ottEndpoint))
161-
http.Handle(prefix + "/accounts", WrapEndpointWithCtx(connector, accountsEndpoint))
162-
163-
http.HandleFunc(prefix + "/", rootEndpoint)
164-
http.Handle(prefix + "/config", WrapEndpointWithCtx(connector, configEndpoint))
165-
http.Handle(prefix + "/config/reload", WrapEndpointWithCtx(connector, configReloadEndpoint))
166-
http.Handle(prefix + "/servers", WrapEndpointWithCtx(connector, serversEndpoint))
167-
http.Handle(prefix + "/server/{id}", WrapEndpointWithCtx(connector, serverEndpoint))
158+
http.Handle(prefix+"/login", WrapEndpointWithCtx(connector, loginEndpoint))
159+
http.Handle(prefix+"/logout", WrapEndpointWithCtx(connector, logoutEndpoint))
160+
http.Handle(prefix+"/ott", WrapEndpointWithCtx(connector, ottEndpoint))
161+
http.Handle(prefix+"/accounts", WrapEndpointWithCtx(connector, accountsEndpoint))
162+
163+
http.HandleFunc(prefix+"/", rootEndpoint)
164+
http.Handle(prefix+"/config", WrapEndpointWithCtx(connector, configEndpoint))
165+
http.Handle(prefix+"/config/reload", WrapEndpointWithCtx(connector, configReloadEndpoint))
166+
http.Handle(prefix+"/servers", WrapEndpointWithCtx(connector, serversEndpoint))
167+
http.Handle(prefix+"/server/{id}", WrapEndpointWithCtx(connector, serverEndpoint))
168168
connector.Upgrader.CheckOrigin = func(_ *http.Request) bool { return true }
169-
http.Handle(prefix + "/server/{id}/console", WrapEndpointWithCtx(connector, consoleEndpoint))
170-
171-
http.Handle(prefix + "/server/{id}/files", WrapEndpointWithCtx(connector, filesEndpoint))
172-
http.Handle(prefix + "/server/{id}/file", WrapEndpointWithCtx(connector, fileEndpoint))
173-
http.Handle(prefix + "/server/{id}/folder", WrapEndpointWithCtx(connector, folderEndpoint))
174-
http.Handle(prefix + "/server/{id}/compress", WrapEndpointWithCtx(connector, compressionEndpoint))
175-
http.Handle(prefix + "/server/{id}/compress/v2", WrapEndpointWithCtx(connector, compressionEndpoint))
176-
http.Handle(prefix + "/server/{id}/decompress", WrapEndpointWithCtx(connector, decompressionEndpoint))
169+
http.Handle(prefix+"/server/{id}/console", WrapEndpointWithCtx(connector, consoleEndpoint))
170+
171+
http.Handle(prefix+"/server/{id}/files", WrapEndpointWithCtx(connector, filesEndpoint))
172+
http.Handle(prefix+"/server/{id}/file", WrapEndpointWithCtx(connector, fileEndpoint))
173+
http.Handle(prefix+"/server/{id}/folder", WrapEndpointWithCtx(connector, folderEndpoint))
174+
http.Handle(prefix+"/server/{id}/compress", WrapEndpointWithCtx(connector, compressionEndpoint))
175+
http.Handle(prefix+"/server/{id}/compress/v2", WrapEndpointWithCtx(connector, compressionEndpoint))
176+
http.Handle(prefix+"/server/{id}/decompress", WrapEndpointWithCtx(connector, decompressionEndpoint))
177177
return connector
178178
}
179179

0 commit comments

Comments
 (0)