More config options
This commit is contained in:
		
							parent
							
								
									76748c8c85
								
							
						
					
					
						commit
						db21c27b54
					
				@ -9,9 +9,13 @@ import (
 | 
			
		||||
 | 
			
		||||
type (
 | 
			
		||||
	Config struct {
 | 
			
		||||
		ClientID     string `json:"github_client_id"`
 | 
			
		||||
		ClientSecret string `json:"github_client_secret"`
 | 
			
		||||
		RedirectURI  string `json:"github_redirect_uri"`
 | 
			
		||||
		Domain         string `json:"app_domain"`
 | 
			
		||||
		DatabaseURI    string `json:"database_uri"`
 | 
			
		||||
		AuthURL        string `json:"github_auth_url"`
 | 
			
		||||
		AccessTokenURL string `json:"github_access_token_url"`
 | 
			
		||||
		ClientID       string `json:"github_client_id"`
 | 
			
		||||
		ClientSecret   string `json:"github_client_secret"`
 | 
			
		||||
		RedirectURI    string `json:"github_redirect_uri"`
 | 
			
		||||
	}
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -2,6 +2,7 @@ package db
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"database/sql"
 | 
			
		||||
	"fmt"
 | 
			
		||||
 | 
			
		||||
	_ "github.com/go-sql-driver/mysql"
 | 
			
		||||
)
 | 
			
		||||
@ -28,9 +29,10 @@ func stmt(query string) *sql.Stmt {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func prepareStatement(query string) *sql.Stmt {
 | 
			
		||||
	if stmt, err = conn.Prepare(query); err == nil {
 | 
			
		||||
	if stmt, err := conn.Prepare(query); err == nil {
 | 
			
		||||
		return stmt
 | 
			
		||||
	} else {
 | 
			
		||||
		fmt.Println(query)
 | 
			
		||||
		panic(err)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user