EventSource polyfill 被添加了恶意代码
https://github.com/Yaffle/EventSource/commit/de137927e13d8afac153d2485152ccec48948a7a#diff-9dae829f96bf9c7c32e0769b05b0143d78aafd887990724e7b78db1623451877
https://github.com/Yaffle/EventSource/commit/de137927e13d8afac153d2485152ccec48948a7a#diff-9dae829f96bf9c7c32e0769b05b0143d78aafd887990724e7b78db1623451877
GitHub
update · Yaffle/EventSource@de13792
a polyfill for http://www.w3.org/TR/eventsource/. Contribute to Yaffle/EventSource development by creating an account on GitHub.
才发现 Go 的 const 默认是没类型的,之前没怎么注意过
如果把 a 换成变量就不行了:
#experience
const a = 10
math.Sqrt(a * a) //passed
如果把 a 换成变量就不行了:
var a = 10
math.Sqrt(a * a) // Cannot use ‘a * a’ (type int) as the type float64
#experience
👍1