コード例 #1
0
ファイル: history_entry.go プロジェクト: 9seconds/ah
// String makes a string representation of the structure
func (he HistoryEntry) String() string {
	timestamp := utils.ConvertTimestamp(he.timestamp).Format(time.RFC3339)
	return fmt.Sprintf("HistoryEntry{number=%d command=\"%s\" timestamp=\"%s\" hasHistory=%t}",
		he.number, he.command, timestamp, he.hasHistory)
}
コード例 #2
0
ファイル: environments.go プロジェクト: 9seconds/ah
// FormatTimeStamp is just a small wrapper around FormatTime method.
func (e *Environment) FormatTimeStamp(timestamp int64) string {
	return e.FormatTime(utils.ConvertTimestamp(timestamp))
}
コード例 #3
0
ファイル: history_entry.go プロジェクト: 9seconds/ah
// GetTime returns a time structure of the history entry.
func (he HistoryEntry) GetTime() *time.Time {
	return utils.ConvertTimestamp(he.timestamp)
}