go fmt
This commit is contained in:
parent
62cc02cffe
commit
552bde1787
|
@ -45,12 +45,10 @@ There are a few command line flags that can be used to change the behaviour of t
|
|||
interface
|
||||
- `-store $driver_name:$driver_args`: changes the datastore driver and its configuration. `$driver_name` is the name of
|
||||
the store driver while `$driver_args` contains driver-specific settings. Currently, only two drivers are implemented:
|
||||
|
||||
- `mem`: a volatile RAM-backed datastore only useful for testing and debugging. It does not take any arguments
|
||||
(i.e.: it can be only used by specifying `-store mem`).
|
||||
- `fs`: the default driver: it stores sync data in json files in the directory specified as the argument (default is
|
||||
`data`)
|
||||
|
||||
- `-maxsize $size`: changes the maximum size of a sync (in bytes) that can be accepted by the API. The default is set
|
||||
to 512000.
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ const defaultMaxSyncSize = 512000
|
|||
type serviceInfoResp struct {
|
||||
Version string `json:"version"`
|
||||
Message string `json:"message"`
|
||||
MaxSyncSize int `json:"maxSyncSize"`
|
||||
MaxSyncSize int `json:"maxSyncSize"`
|
||||
Status int `json:"status"`
|
||||
}
|
||||
|
||||
|
@ -88,9 +88,9 @@ func info(w http.ResponseWriter, req *http.Request) {
|
|||
} else {
|
||||
log.Println("info()")
|
||||
serviceInfo := serviceInfoResp{
|
||||
Version: apiVersion,
|
||||
Message: infoMessage,
|
||||
Status: serviceStatus,
|
||||
Version: apiVersion,
|
||||
Message: infoMessage,
|
||||
Status: serviceStatus,
|
||||
MaxSyncSize: maxSyncSize}
|
||||
sendJSONOk(w, serviceInfo)
|
||||
}
|
||||
|
@ -240,7 +240,7 @@ func init() {
|
|||
case "mem":
|
||||
storeDrv, err = syncstore.NewMemStore()
|
||||
default:
|
||||
err = fmt.Errorf("Invalid store driver: "+ storeFlagTokens[0])
|
||||
err = fmt.Errorf("Invalid store driver: " + storeFlagTokens[0])
|
||||
}
|
||||
if err != nil {
|
||||
log.Fatalf("store initialization failed: %v", err)
|
||||
|
|
Loading…
Reference in New Issue