Fix linting problems

This commit is contained in:
Jamie Curnow
2021-06-30 11:20:34 +10:00
parent 80a31b3041
commit 86a35beb3a
26 changed files with 53 additions and 51 deletions

View File

@@ -18,7 +18,7 @@ func getFilterMapFunctions() map[string]entity.FilterMapFunction {
return filterMapFunctions
}
// GetFilterSchema ...
// GetFilterSchema returns filter schema
func GetFilterSchema() string {
var m Model
return entity.GetFilterSchema(m)

View File

@@ -13,14 +13,15 @@ import (
const (
tableName = "certificate"
// TypeCustom ...
// TypeCustom custom cert type
TypeCustom = "custom"
// TypeHTTP ...
// TypeHTTP http cert type
TypeHTTP = "http"
// TypeDNS ...
// TypeDNS dns cert type
TypeDNS = "dns"
// TypeMkcert ...
// TypeMkcert mkcert cert type
TypeMkcert = "mkcert"
// StatusReady is ready for certificate to be requested
StatusReady = "ready"
// StatusRequesting is process of being requested
@@ -151,7 +152,7 @@ func (m *Model) Expand() {
}
}
// Request ...
// Request makes a certificate request
func (m *Model) Request() error {
m.Expand()
m.Status = StatusRequesting

View File

@@ -18,7 +18,7 @@ func getFilterMapFunctions() map[string]entity.FilterMapFunction {
return filterMapFunctions
}
// GetFilterSchema ...
// GetFilterSchema returns filter schema
func GetFilterSchema() string {
var m Model
return entity.GetFilterSchema(m)

View File

@@ -18,7 +18,7 @@ func getFilterMapFunctions() map[string]entity.FilterMapFunction {
return filterMapFunctions
}
// GetFilterSchema ...
// GetFilterSchema returns filter schema
func GetFilterSchema() string {
var m Model
return entity.GetFilterSchema(m)

View File

@@ -11,10 +11,10 @@ import (
// FilterMapFunction is a filter map function
type FilterMapFunction func(value []string) []string
// FilterTagName ...
// FilterTagName tag name user for filter pickups
const FilterTagName = "filter"
// DBTagName ...
// DBTagName tag name user for field name pickups
const DBTagName = "db"
// GenerateSQLFromFilters will return a Query and params for use as WHERE clause in SQL queries
@@ -96,7 +96,7 @@ func getSQLAssignmentFromModifier(filter model.Filter, params *[]interface{}) st
return clause
}
// GetFilterMap ...
// GetFilterMap returns the filter map
func GetFilterMap(m interface{}) map[string]string {
var filterMap = make(map[string]string)
@@ -125,7 +125,7 @@ func GetFilterMap(m interface{}) map[string]string {
return filterMap
}
// GetDBColumns ...
// GetDBColumns returns the db columns
func GetDBColumns(m interface{}) []string {
var columns []string
t := reflect.TypeOf(m)

View File

@@ -18,7 +18,7 @@ func getFilterMapFunctions() map[string]entity.FilterMapFunction {
return filterMapFunctions
}
// GetFilterSchema ...
// GetFilterSchema returns filter schema
func GetFilterSchema() string {
var m Model
return entity.GetFilterSchema(m)

View File

@@ -11,11 +11,11 @@ import (
const (
tableName = "host"
// ProxyHostType ...
// ProxyHostType is self explanatory
ProxyHostType = "proxy"
// RedirectionHostType ...
// RedirectionHostType is self explanatory
RedirectionHostType = "redirection"
// DeadHostType ...
// DeadHostType is self explanatory
DeadHostType = "dead"
)

View File

@@ -18,7 +18,7 @@ func getFilterMapFunctions() map[string]entity.FilterMapFunction {
return filterMapFunctions
}
// GetFilterSchema ...
// GetFilterSchema returns filter schema
func GetFilterSchema() string {
var m Model
return entity.GetFilterSchema(m)

View File

@@ -18,7 +18,7 @@ func getFilterMapFunctions() map[string]entity.FilterMapFunction {
return filterMapFunctions
}
// GetFilterSchema ...
// GetFilterSchema returns filter schema
func GetFilterSchema() string {
var m Model
return entity.GetFilterSchema(m)

View File

@@ -18,7 +18,7 @@ func getFilterMapFunctions() map[string]entity.FilterMapFunction {
return filterMapFunctions
}
// GetFilterSchema ...
// GetFilterSchema returns filter schema
func GetFilterSchema() string {
var m Model
return entity.GetFilterSchema(m)