This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
type student struct{ | |
name string | |
age int | |
lastName string | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
type Movies struct{ | |
name string | |
actor string | |
} | |
var log = fmt.Println |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |