方法一:利用回调函数constfs=require('fs')constpath=require('path')constfileHelper={readFile:(path,cb)=>{fs.readFile(path,{encod…
packagemainimport("os""fmt""bufio""io")funcReadFileLine(pathstring){//打开文件f,err:=os.Open(path)iferr!=nil{fmt.Println("op…
发现用INI做配置的话,实在有太多的东西难以描述,所以自己做了一个XML的配置文件存取类。需要的同学可以直接拿去用,但希望尊重劳动成果,保留版权信息。废话不多说,上代码!1unitXMLConfig;2{------------------…