Upgrade to Pro — share decks privately, control downloads, hide ads and more …

TOKIWANOMORI-20180901

MzRyuKa
September 01, 2018

 TOKIWANOMORI-20180901

トキワの森LT大会(2018/09/01)でLT発表した資料です。

MzRyuKa

September 01, 2018
Tweet

More Decks by MzRyuKa

Other Decks in Programming

Transcript

  1. ϑΝΠϧͷܗࣜνΣοΫ͸ɺGoͰͲ͏͢Ε͹ྑ͍ ͔Θ͔Βͳ͔ͬͨͷͰɺ֎෦ίϚϯυͰʮfileʯΛ ࣮ߦ͢ΔΑ͏ʹͨ͠ɻ out, err := exec.Command(“file”,fullpath).Output() if err !=

    nil { return false } outstr := fmt.Sprintf(“out: %s”, out) if strings.Index(outstr, “ASCII text”) == -1 { return false } return true