Please help me with this

func printitem(r Response, jitem string) []string {
    item := []string{}
    for _, p := range r.Result {
        item = append(item, jitem+":"+p.jitem)
    }
    return item
}
how to pass a variable to this, jitem

p.jitem undefined (type struct{BlockNumber string "json:\"blockNumber\""; 
TimeStamp string "json:\"timeStamp\""; Hash string "json:\"hash\""; Nonce 
string "json:\"nonce\""; BlockHash string "json:\"blockHash\""; 
TransactionIndex string "json:\"transactionIndex\""; From string 
"json:\"from\""; To string "json:\"to\""; Value string "json:\"value\""; 
Gas string "json:\"gas\""; GasPrice string "json:\"gasPrice\""; IsError 
string "json:\"isError\""; TxreceiptStatus string 
"json:\"txreceipt_status\""; Input string "json:\"input\""; ContractAddress 
string "json:\"contractAddress\""; CumulativeGasUsed string 
"json:\"cumulativeGasUsed\""; GasUsed string "json:\"gasUsed\""; 
Confirmations string "json:\"confirmations\""} has no field or method 
jitem)compilerMissingFieldOrMethod 
<https://pkg.go.dev/golang.org/x/tools/internal/typesinternal?utm_source%3Dgopls#MissingFieldOrMethod>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/e959d1a7-c97e-449b-8381-a689f427accan%40googlegroups.com.

Reply via email to