Skip to content

Commit

Permalink
separate lang.* package
Browse files Browse the repository at this point in the history
  • Loading branch information
takashi committed May 7, 2014
1 parent e87c2aa commit 267b2eb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"bufio"
"github.com/takashi/erk/language"
"os"
"path/filepath"
"regexp"
Expand Down Expand Up @@ -39,7 +40,7 @@ func WalkFn(path string, info os.FileInfo, err error) error {

func ParseIssues(path string, info os.FileInfo) error {
// do the file parse here
lang := DetectLangFromExt(filepath.Ext(path))
lang := language.DetectLangFromExt(filepath.Ext(path))
if lang != nil {
err := ParseIssuesByLang(lang, path, info)
if err != nil {
Expand All @@ -49,7 +50,7 @@ func ParseIssues(path string, info os.FileInfo) error {
return nil
}

func ParseIssuesByLang(lang *Lang, path string, info os.FileInfo) error {
func ParseIssuesByLang(lang *language.Lang, path string, info os.FileInfo) error {
file, err := os.Open(path)
if err != nil {
return err
Expand Down

0 comments on commit 267b2eb

Please sign in to comment.