Skip to content

Instantly share code, notes, and snippets.

View developer1622's full-sized avatar
💭
Passionate Backend Engineer

Ramu Mangalarapu developer1622

💭
Passionate Backend Engineer
View GitHub Profile
@developer1622
developer1622 / postman.json
Created January 2, 2022 09:20
Postman collection for Basic REST API on contact
{
"info": {
"_postman_id": "047925bc-b6fe-4581-9d0c-8d8c10061cb2",
"name": "Contacts",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Index of the server",
"request": {
@developer1622
developer1622 / main.go
Created January 2, 2022 09:16
Basic REST API in Golang (Simple non persistent CRUD App on Contact)
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"github.com/julienschmidt/httprouter"
)
@developer1622
developer1622 / stringReverse.go
Created July 24, 2021 10:40
Reverse string in Golang
// reverse takes string 's' and reverses it and returns it.
// reverse does not create new string.
func reverse(s string) string {
// as strings are immutable in Golang, we have to convert
// to rune slice, which can be modified
// FYI: https://zetcode.com/golang/rune/
rStr := []rune(s)
for i, j := 0, len(rStr)-1; i < j; i, j = i+1, j-1 {
// swap the letters of the string,
@developer1622
developer1622 / helloMars.go
Last active July 24, 2021 10:34
Hello Mars Code in Golang
package main
import "fmt"
func main() {
// We may write hello mars once we reach there
fmt.Println("Hello Mars !")
}