I think ``"net/http"`` has a number of prefabricated constants for these codes.