调整结构
This commit is contained in:
@@ -20,7 +20,10 @@ func ParseErlangFile(filePath string) (*ModuleInfo, error) {
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("读取文件失败: %v", err)
|
||||
}
|
||||
return ParseErlangFileByBytes(filePath, content)
|
||||
}
|
||||
|
||||
func ParseErlangFileByBytes(filePath string, content []byte) (*ModuleInfo, error) {
|
||||
lines := strings.Split(string(content), "\n")
|
||||
moduleInfo := &ModuleInfo{
|
||||
FilePath: filePath,
|
||||
|
||||
Reference in New Issue
Block a user