mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
fix: correct stickler-ci issues
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
package resource
|
||||
|
||||
// A collection of resource constraints for apps
|
||||
type Resource struct {
|
||||
Cpu string `json:"cpu"`
|
||||
CPU string `json:"cpu"`
|
||||
Memory string `json:"memory"`
|
||||
MemorySwap string `json:"memory-swap"`
|
||||
Network string `json:"network"`
|
||||
NetworkIngress string `json:"network-ingress"`
|
||||
NetworkEgress string `json:"network-egress"`
|
||||
}
|
||||
|
||||
const PluginName = "resource"
|
||||
|
||||
@@ -20,7 +20,7 @@ func main() {
|
||||
args.Parse(os.Args[2:])
|
||||
|
||||
resources := resource.Resource{
|
||||
Cpu: *cpu,
|
||||
CPU: *cpu,
|
||||
Memory: *memory,
|
||||
MemorySwap: *memorySwap,
|
||||
Network: *network,
|
||||
|
||||
@@ -20,7 +20,7 @@ func main() {
|
||||
args.Parse(os.Args[2:])
|
||||
|
||||
resources := resource.Resource{
|
||||
Cpu: *cpu,
|
||||
CPU: *cpu,
|
||||
Memory: *memory,
|
||||
MemorySwap: *memorySwap,
|
||||
Network: *network,
|
||||
|
||||
@@ -32,7 +32,7 @@ func setRequestType(args []string, processType string, r Resource, requestType s
|
||||
}
|
||||
|
||||
resources := map[string]string{
|
||||
"cpu": r.Cpu,
|
||||
"cpu": r.CPU,
|
||||
"memory": r.Memory,
|
||||
"memory-swap": r.MemorySwap,
|
||||
"network": r.Network,
|
||||
@@ -63,7 +63,7 @@ func setRequestType(args []string, processType string, r Resource, requestType s
|
||||
}
|
||||
|
||||
property := fmt.Sprintf("%v.%v.%v", processType, requestType, key)
|
||||
err = common.PropertyWrite(PluginName, appName, property, value)
|
||||
err = common.PropertyWrite("resource", appName, property, value)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user