You can read this blog to understand the difference between them :https://medium.com/geekculture/demystifying-http-handlers-in-golang-a363e4222756