Documentation
¶
Index ¶
Constants ¶
View Source
const ConfigPath = "~/.95cli/config.json"
View Source
const DefaultAPIURL = "https://api.95ninefive.dev"
DefaultAPIURL is the production API endpoint
View Source
const LocalAPIURL = "http://localhost:8080"
LocalAPIURL is the development API endpoint
Variables ¶
This section is empty.
Functions ¶
func DetectLanguage ¶
DetectLanguage detects programming language from run command
func SaveProjectConfig ¶
SaveProjectConfig writes runCommand and language to config.json in current directory
Types ¶
type Config ¶
type Config struct {
APIUrl string `json:"api_url" mapstructure:"api_url"`
AccessToken string `json:"access_token" mapstructure:"access_token"`
RefreshToken string `json:"refresh_token" mapstructure:"refresh_token"`
UserId int `json:"user_id" mapstructure:"user_id"`
Username string `json:"username" mapstructure:"username"`
}
type ProjectConfig ¶
type ProjectConfig struct {
RunCommand string `json:"runCommand"`
Language string `json:"language"`
}
func LoadProjectConfig ¶
func LoadProjectConfig() (*ProjectConfig, error)
LoadProjectConfig reads .95cli-project.json from current directory
Click to show internal directories.
Click to hide internal directories.