File tree Expand file tree Collapse file tree
internal/controlplane/http Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1256,39 +1256,30 @@ func (h *AdminHostsHandler) GetLogs() nethttp.Handler {
12561256func intPtr (v int ) * int { return & v }
12571257func floatPtr (v float64 ) * float64 { return & v }
12581258
1259- // resolveMemory 三态解析:nil → 默认值(4096) / 0 → NULL( 无限制) / >0 → 传值。
1259+ // resolveMemory 三态解析:nil → 默认值(4096) / 0 → 无限制 / >0 → 传值。
12601260func resolveMemory (mb * int ) * int {
12611261 if mb == nil {
12621262 def := 4096
12631263 return & def
12641264 }
1265- if * mb == 0 {
1266- return nil
1267- }
12681265 return mb
12691266}
12701267
1271- // resolveCPU 三态解析:nil → 默认值(2.0) / 0 → NULL( 无限制) / >0 → 传值。
1268+ // resolveCPU 三态解析:nil → 默认值(2.0) / 0 → 无限制 / >0 → 传值。
12721269func resolveCPU (cpu * float64 ) * float64 {
12731270 if cpu == nil {
12741271 def := 2.0
12751272 return & def
12761273 }
1277- if * cpu == 0 {
1278- return nil
1279- }
12801274 return cpu
12811275}
12821276
1283- // resolveDisk 三态解析:nil → 默认值(20) / 0 → NULL( 无限制) / >0 → 传值。
1277+ // resolveDisk 三态解析:nil → 默认值(20) / 0 → 无限制 / >0 → 传值。
12841278func resolveDisk (gb * int ) * int {
12851279 if gb == nil {
12861280 def := 20
12871281 return & def
12881282 }
1289- if * gb == 0 {
1290- return nil
1291- }
12921283 return gb
12931284}
12941285
You can’t perform that action at this time.
0 commit comments