aerogear/mobile-developer-console
Use the dedicated script to start Minishift. This enables CORS gives the developer
user cluster-admin
privileges.
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
import React, { useState, useEffect } from "react"; | |
import PropTypes from "prop-types"; | |
/** | |
* Customisable alert component that remains hidden until called. | |
* | |
* @param {boolean} props.visible - The current visibility of the component. | |
* @param {number} [props.duration] - The time in milliseconds to display the component for. If not set, the component will stay open. | |
* @param {func} onTimeoutEnd - Set visible state of component from parent. | |
* @param {*} props.children - Child components. |
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 config | |
import ( | |
"os" | |
"strconv" | |
"strings" | |
) | |
type GitHubConfig struct { | |
Username string |
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 ( | |
"fmt" | |
"log" | |
"github.com/craicoverflow/go-environment-variables-example/config" | |
"github.com/joho/godotenv" | |
) |
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 ( | |
"fmt" | |
"log" | |
"github.com/joho/godotenv" | |
"github.com/craicoverflow/go-environment-variables-example/config" | |
) |
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 config | |
import ( | |
"os" | |
) | |
type GitHubConfig struct { | |
Username string | |
APIKey string | |
} |
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" | |
"github.com/joho/godotenv" | |
"fmt" | |
"os" | |
) | |
// init is invoked before main() |
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 ( | |
"fmt" | |
"os" | |
) | |
func main() { | |
// Set the USERNAME environment variable to "MattDaemon" | |
os.Setenv("USERNAME", "MattDaemon") |
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 ( | |
"fmt" | |
"os" | |
) | |
func main() { | |
// Store the PATH environment variable in a variable | |
path, exists := os.LookupEnv("PATH") |