Profile cover photo
Profile photo
Diego Medina
151 followers
151 followers
About
Communities and Collections
View all
Posts

Post has attachment
Add a comment...

Post has attachment
Add a comment...

Post has attachment
Add a comment...

Post has shared content

Post has attachment
What a thought can do
What a thought can do. For quite some time I have been thinking of different ways I could improve my life and the life of others. And one tool that has been with me all this time is my thoughts. Many would say that a thought isn't really anything that would...
What a thought can do
What a thought can do
owleverywhere.blogspot.com
Add a comment...

Post has attachment
From Reluctance to Reverence: A Yogini's Journey
Eight years ago, when my husband finally convinced me to try yoga, I approached it with serious skepticism. Yoga, I thought, was for those who could not handle the weight and interval training that I was accustomed to. At that time, my yoga days masqueraded...
Add a comment...

Post has attachment

Post has attachment
Diego Medina commented on a post on Blogger.
there is actually an even simpler way to dump json to a response.

json.NewEncoder(rw).Encode( Response{"success": true, "message": "Hello!"} )

where rw is the ResponseWriter from the handlerFunc

in context, it would be:

func myHandler(rw http.ResponseWriter, req *http.Request) {
        ...
        rw.Header().Set("Content-Type", "application/json")
        json.NewEncoder(rw).Encode( Response{"success": true, "message": "Hello!"} )
}
Add a comment...

Post has attachment
Which one is the real cat?
Photo
Add a comment...

you know you live in a small town when mail sent to your home under a different name gets a question mark added by the local post office :)
Add a comment...
Wait while more posts are being loaded