Documentation ¶
Overview ¶
Example ¶
package main import ( "context" "fmt" "github.com/protogodev/validate/examples/messaging" ) func main() { var svc messaging.Service = &messaging.Messaging{} svc = messaging.ValidateMiddleware(nil)(svc) text, err := svc.GetMessage(context.Background(), "123", "00000000-1111-2222-3333-001122334455") fmt.Printf("text: %q, err: %v\n", text, err) text, err = svc.GetMessage(context.Background(), "", "") fmt.Printf("text: %q, err: %v\n", text, err) }
Output: text: "user[123]: message[00000000-1111-2222-3333-001122334455]", err: <nil> text: "", err: userID: INVALID(has an invalid length), messageID: INVALID(invalid UUID)
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.