This file contains hidden or 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
const HDWalletProvider = require('@truffle/hdwallet-provider'); | |
const fs = require('fs'); | |
const mnemonic = fs.readFileSync(".secret").toString().trim(); | |
module.exports = { | |
networks: { | |
development: { | |
host: "127.0.0.1", // Localhost (default: none) | |
port: 8545, // Standard BSC port (default: none) | |
network_id: "*", // Any network (default: none) |
This file contains hidden or 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
// getContractAddress returns the address of the contract | |
// hardcoded :) | |
function getContractAddress() { | |
// replace this to match your contract address | |
return "0x083863013a6b34a4a265eb6ff696daf35071c48e"; | |
} |
This file contains hidden or 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 ( | |
"log" | |
zlog "github.com/rs/zerolog/log" | |
) | |
func main() { | |
log.Print("Hello") | |
zlog.Print("Hello") |
This file contains hidden or 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/rs/zerolog/log" | |
) | |
func main() { | |
// Log with service name | |
log.Info(). |
This file contains hidden or 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/rs/zerolog" | |
"github.com/rs/zerolog/log" | |
) | |
func main() { | |
// Apply zerolog global level, this will stop zerolog from logging any debug messages |
This file contains hidden or 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/rs/zerolog" | |
"github.com/rs/zerolog/log" | |
) | |
var ( | |
HelloCounter = 1 | |
logger zerolog.Logger |
This file contains hidden or 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
JIRA_USER="[email protected]" | |
JIRA_TOKEN="api-token" | |
JIRA_URL="https://your-cloud-name.atlassian.com" |
This file contains hidden or 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 ( | |
"log" | |
"os" | |
"github.com/joho/godotenv" | |
jira "gopkg.in/andygrunwald/go-jira.v1" | |
) |
This file contains hidden or 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
// getProjects is a function that lists all projects | |
func getProjects(client *jira.Client) { | |
// use the Project domain to list all projects | |
projectList, _, err := client.Project.GetList() | |
if err != nil { | |
log.Fatal(err) | |
} | |
// Range over the projects and print the key and name | |
for _, project := range *projectList { | |
fmt.Printf("%s: %s\n", project.Key, project.Name) |
This file contains hidden or 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
// getIssues will query Jira API using the provided JQL string | |
func getIssues(client *jira.Client, jql string) { | |
issues, _, err := client.Issue.Search(jql, nil) | |
if err != nil { | |
panic(err) | |
} | |
for _, i := range issues { | |
fmt.Printf("%s (%s/%s): %+v -> %s\n", i.Key, i.Fields.Type.Name, i.Fields.Priority.Name, i.Fields.Summary, i.Fields.Status.Name) | |
fmt.Printf("Assignee : %v\n", i.Fields.Assignee.DisplayName) |