27 lines
487 B
Go
27 lines
487 B
Go
package grpcserver
|
|
|
|
import (
|
|
"solidarity-service/servers/grpc/proto"
|
|
)
|
|
|
|
func ConvertToProtoDayOfTheWeek(day string) proto.DayOfWeek {
|
|
switch day {
|
|
case "MON":
|
|
return proto.DayOfWeek_MON
|
|
case "TUE":
|
|
return proto.DayOfWeek_TUE
|
|
case "WED":
|
|
return proto.DayOfWeek_WED
|
|
case "THU":
|
|
return proto.DayOfWeek_THU
|
|
case "FRI":
|
|
return proto.DayOfWeek_FRI
|
|
case "SAT":
|
|
return proto.DayOfWeek_FRI
|
|
case "SUN":
|
|
return proto.DayOfWeek_SAT
|
|
default:
|
|
return proto.DayOfWeek_MON
|
|
}
|
|
}
|