Skip to content

Commit

Permalink
Rewrite new struct.
Browse files Browse the repository at this point in the history
  • Loading branch information
toomore committed Apr 17, 2015
1 parent ebe86e9 commit c2479e0
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions twse/stock_daily_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@ type Data struct {

// NewTWSE 建立一個 TWSE 上市股票
func NewTWSE(No string, Date time.Time) *Data {
data := new(Data)
data.No = No
data.Date = Date
data.exchange = "tse"
return data
return &Data{
No: No,
Date: Date,
exchange: "tse",
}
}

// NewOTC 建立一個 OTC 上櫃股票
func NewOTC(No string, Date time.Time) *Data {
data := new(Data)
data.No = No
data.Date = Date
data.exchange = "otc"
return data
return &Data{
No: No,
Date: Date,
exchange: "otc",
}
}

// URL return stock csv url path.
Expand Down

0 comments on commit c2479e0

Please sign in to comment.