Skip to content

Instantly share code, notes, and snippets.

View MuthukumarHelios's full-sized avatar

muthukumarHelios MuthukumarHelios

View GitHub Profile
@MuthukumarHelios
MuthukumarHelios / heimdallngnix.go
Last active March 26, 2019 18:32
heimdall failing for ngnix
package main
import "github.com/gorilla/mux""
func GetRequestWithRawHttp(w http.ResponseWriter, r *http.Request) {
api := "http://13.126.204.154/api/excel-report/v1/smart/live?reportName=agencyPerformanceReport&itemsperpage=10&pageNo=1&from=2018-02-22T12:10:19.441Z&to=2019-04-22T12:10:19.441Z"
httpC := &http.Client{}
req, err := http.NewRequest("GET", api, nil)
tokenValue := r.Header["Authorization"]
fmt.Println(tokenValue)
@MuthukumarHelios
MuthukumarHelios / interface.go
Created March 5, 2018 06:54
Struct vs interface
package main
import "fmt"
type student struct{
name string
age int
lastName string
}
@MuthukumarHelios
MuthukumarHelios / .go
Last active May 8, 2018 06:31
GOlang Test Coverage Report
go get github.com/axw/gocov
go get github.com/matm/gocov-html
//Generate the Test All the Path's Are Fixed
gocov test >hey.json
//Using the Json Generate the Html
gocov-html hey.json >hey.html
@MuthukumarHelios
MuthukumarHelios / goLang struct with Methods.go
Created February 6, 2018 18:18
Go lang Struct with Methods
package main
import "fmt"
type Movies struct{
name string
actor string
}
var log = fmt.Println
@MuthukumarHelios
MuthukumarHelios / .go
Last active January 26, 2018 06:11
Go lang Structs and interfaces
What is Structs
Structs are the Collection of Field with data types declared by user:
Uses :
Rather by maintaining a seperate Data type we can use a struct
Example1 --Struct vs Variable