Skip to content

Commit c2fad06

Browse files
committed
broken links and small change in returns
1 parent 3c616ff commit c2fad06

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

DanielWhitenack-GoForDataScience/code/counts/counts.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ func prepareCountData(dataSet string) ([][]int, error) {
4848
// Get the data set we stored in pachyderm.
4949
data, err := getDataSet(dataSet, "master", "godata")
5050
if err != nil {
51-
return [][]int{}, errors.Wrap(err, "Could not get data from pachyderm")
51+
return nil, errors.Wrap(err, "Could not get data from pachyderm")
5252
}
5353

5454
// Extract the records from the data.
5555
reader := csv.NewReader(bytes.NewReader(data.Bytes()))
5656
reader.FieldsPerRecord = -1
5757
records, err := reader.ReadAll()
5858
if err != nil {
59-
return [][]int{}, errors.Wrap(err, "Could not read in data records.")
59+
return nil, errors.Wrap(err, "Could not read in data records.")
6060
}
6161

6262
// Create a map of daily created repos where the keys are the days and
@@ -66,7 +66,7 @@ func prepareCountData(dataSet string) ([][]int, error) {
6666
for _, each := range records {
6767
t, err := time.Parse(layout, each[2][0:19])
6868
if err != nil {
69-
return [][]int{}, errors.Wrap(err, "Could not parse timestamps")
69+
return nil, errors.Wrap(err, "Could not parse timestamps")
7070
}
7171
interval := int(t.Sub(startTime).Hours() / 24.0)
7272
countMap[interval]++

DanielWhitenack-GoForDataScience/code/linearregression/linearregression.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ func prepareCountData(dataSet string) ([][]int, error) {
7777
// Get the data set we stored in pachyderm.
7878
data, err := getDataSet(dataSet, "master", "godata")
7979
if err != nil {
80-
return [][]int{}, errors.Wrap(err, "Could not get data from pachyderm")
80+
return nil, errors.Wrap(err, "Could not get data from pachyderm")
8181
}
8282

8383
// Extract the records from the data.
8484
reader := csv.NewReader(bytes.NewReader(data.Bytes()))
8585
reader.FieldsPerRecord = -1
8686
records, err := reader.ReadAll()
8787
if err != nil {
88-
return [][]int{}, errors.Wrap(err, "Could not read in data records.")
88+
return nil, errors.Wrap(err, "Could not read in data records.")
8989
}
9090

9191
// Create a map of daily created repos where the keys are the days and
@@ -95,7 +95,7 @@ func prepareCountData(dataSet string) ([][]int, error) {
9595
for _, each := range records {
9696
t, err := time.Parse(layout, each[2][0:19])
9797
if err != nil {
98-
return [][]int{}, errors.Wrap(err, "Could not parse timestamps")
98+
return nil, errors.Wrap(err, "Could not parse timestamps")
9999
}
100100
interval := int(t.Sub(startTime).Hours() / 24.0)
101101
countMap[interval]++
Binary file not shown.

0 commit comments

Comments
 (0)