wiw/shift.go
Method Shift.UnmarshalJSON
has 8 return statements (exceeds 4 allowed). Open
Open
func (s *Shift) UnmarshalJSON(b []byte) error {
const rfc2822Layout = "Mon Jan 02 15:04:05 -0700 2006"
var parsed map[string]interface{}
if err := json.Unmarshal(b, &parsed); err != nil {
Your code does not pass gofmt in 3 places. Go fmt your code! Open
Open
package wiw
- Exclude checks
exported function SummarizeShifts should have comment or be unexported Open
Open
func SummarizeShifts(shifts []Shift) map[string][]float64 {
- Exclude checks
exported const WorkHoursPerDay should have comment or be unexported Open
Open
const WorkHoursPerDay = 8
- Exclude checks
exported type Shift should have comment or be unexported Open
Open
type Shift struct {
- Exclude checks
comment on exported method Shift.UnmarshalJSON should be of the form "UnmarshalJSON ..." Open
Open
//workaround since gorm wont recognize time.Time composed types
- Exclude checks
comment on exported const HoursPerWeek should be of the form "HoursPerWeek ..." Open
Open
//used for calculating hours worked in a whole week.
- Exclude checks