()
| 30 | ) |
| 31 | |
| 32 | func productVersionFromWailsJSON() string { |
| 33 | productVersionOnce.Do(func() { |
| 34 | var cfg struct { |
| 35 | Info struct { |
| 36 | ProductVersion string `json:"productVersion"` |
| 37 | } `json:"info"` |
| 38 | } |
| 39 | if err := json.Unmarshal(embeddedWailsJSON, &cfg); err != nil || cfg.Info.ProductVersion == "" { |
| 40 | productVersionCached = "0.0.0" |
| 41 | return |
| 42 | } |
| 43 | productVersionCached = cfg.Info.ProductVersion |
| 44 | }) |
| 45 | return productVersionCached |
| 46 | } |
no outgoing calls
no test coverage detected