Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseProjectLangStat ¶
func ParseProjectLangStat(jsonBytes []byte, projectLangStat *ProjectLangStat) error
ParseProjectLangStat 反序列化json到ProjectLangStat
Types ¶
type LangStatHeader ¶
type LangStatHeader struct { ClocUrl string `json:"cloc_url"` // cloc的GitHub地址 ClocVersion string `json:"cloc_version"` //版本 ElapsedSeconds float64 `json:"elapsed_seconds"` //扫描所用的时间(秒) NFiles uint32 `json:"n_files"` //扫描的文件总数 NLines uint32 `json:"n_lines"` //扫描的行数总数 FilesPerSecond float64 `json:"files_per_second"` //每秒扫描文件的数目 LinesPerSecond float64 `json:"lines_per_second"` //每秒扫描行的数目 }
type LanguageStat ¶
type ProjectLangStat ¶
type ProjectLangStat struct { Header LangStatHeader `json:"header"` Langs map[string]LanguageStat `json:"langs"` }
func ScanLanguage ¶
func ScanLanguage(filePath string) (*ProjectLangStat, error)
Click to show internal directories.
Click to hide internal directories.