mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 11:55:40 +01:00
formatting
This commit is contained in:
parent
daab24eb2f
commit
3a7b411789
3 changed files with 17 additions and 22 deletions
|
|
@ -9,12 +9,11 @@
|
||||||
package misc
|
package misc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
|
||||||
"bytes"
|
"bytes"
|
||||||
"mime/multipart"
|
"mime/multipart"
|
||||||
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
// CreateFormFile creates an [io.Writer] like [mime/multipart.Writer.CreateFromFile].
|
// CreateFormFile creates an [io.Writer] like [mime/multipart.Writer.CreateFromFile].
|
||||||
// This version allows to set the mime type, too.
|
// This version allows to set the mime type, too.
|
||||||
func TestCreateFormFile(t *testing.T) {
|
func TestCreateFormFile(t *testing.T) {
|
||||||
|
|
|
||||||
|
|
@ -10,12 +10,10 @@
|
||||||
package models
|
package models
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
|
||||||
"testing"
|
"testing"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
func TestNewTimeInterval(t *testing.T) {
|
func TestNewTimeInterval(t *testing.T) {
|
||||||
var before time.Time
|
var before time.Time
|
||||||
before = time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC)
|
before = time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC)
|
||||||
|
|
@ -24,7 +22,6 @@ func TestNewTimeInterval(t *testing.T) {
|
||||||
NewTimeInterval(after, before)
|
NewTimeInterval(after, before)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func TestGuessDate(t *testing.T) {
|
func TestGuessDate(t *testing.T) {
|
||||||
if _, guess := guessDate("2006-01-02T15:04:05"); !guess {
|
if _, guess := guessDate("2006-01-02T15:04:05"); !guess {
|
||||||
t.Errorf("Failure: Could not guess valid Date from valid string")
|
t.Errorf("Failure: Could not guess valid Date from valid string")
|
||||||
|
|
@ -34,7 +31,6 @@ func TestGuessDate(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func TestUnmarshalText(t *testing.T) {
|
func TestUnmarshalText(t *testing.T) {
|
||||||
testTimeRange := NewTimeInterval(
|
testTimeRange := NewTimeInterval(
|
||||||
time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC),
|
time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue