kshedden / datareader

Read binary SAS (SAS7BDAT) and Stata (dta) files in the Go (Golang) programming language. Also provides command line tools for working with these file formats.
BSD 3-Clause "New" or "Revised" License
22 stars 12 forks source link

Adds the sas.ColumnLabels field. #9

Closed gmeixiong closed 4 years ago

gmeixiong commented 4 years ago

This PR adds the exported field ColumnLabels. Fixes a bug in parsing the column labels where the column label length's offset was incorrectly being set to the column label offset's length.

codecov-io commented 4 years ago

Codecov Report

Merging #9 into master will decrease coverage by 0.16%. The diff coverage is 52.94%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #9      +/-   ##
==========================================
- Coverage   50.74%   50.58%   -0.17%     
==========================================
  Files           5        5              
  Lines        2227     2238      +11     
==========================================
+ Hits         1130     1132       +2     
- Misses        859      866       +7     
- Partials      238      240       +2
Impacted Files Coverage Δ
sas7bdat.go 62.91% <52.94%> (-0.59%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9e40802...5c655b8. Read the comment docs.

gmeixiong commented 4 years ago

Added support for DATETIME columns. The functionality already existed for sas.CreatedTime and sas.ModifiedTime. Compartmentalized this into a function that gets used for DATETIME columns.

kshedden commented 4 years ago

Thanks, looks good. I will merge now.