
25 Feb
2021
25 Feb
'21
11:49 a.m.
filed => field
private def get_boot_ipxe(job : Job) + return job["ipxe_response"] if job["ipxe_response"]?
What if job["ipxe_response"] exists but is nil/false? 如果你的意思是 "ipxe_response"字段是否存在,那么就把代码写成 字段是否存在。 避免间接和偷懒的if测试。 那容易让人误解,抓不住你原本的目的。 Thanks, Fengguang
response = "#!ipxe\n\n"
_initrds_uri = Array(String).from_json(job.initrds_uri).map { |uri| "initrd #{uri}" } -- 2.23.0