summaryrefslogtreecommitdiffstats
path: root/models/models.go
diff options
context:
space:
mode:
authorBo-Yi Wu <appleboy.tw@gmail.com>2016-12-30 15:26:05 +0800
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2016-12-30 20:41:10 +0100
commit6510e5775896343f0a69c47ad31c439c7310ff34 (patch)
tree875044ba5fcd58a4cc7e7d1b1215f7217963a30d /models/models.go
parentd0490c187cf6720ed4d0e8ce14c8706e61adaf1f (diff)
downloadgitea-6510e5775896343f0a69c47ad31c439c7310ff34.tar.gz
gitea-6510e5775896343f0a69c47ad31c439c7310ff34.zip
fix gofmt error
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Diffstat (limited to 'models/models.go')
-rw-r--r--models/models.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/models/models.go b/models/models.go
index 1bebaa602c..e937580d18 100644
--- a/models/models.go
+++ b/models/models.go
@@ -156,15 +156,15 @@ func parsePostgreSQLHostPort(info string) (string, string) {
func parseMSSQLHostPort(info string) (string, string) {
host, port := "127.0.0.1", "1433"
- if strings.Contains(info, ":") {
- host = strings.Split(info, ":")[0]
- port = strings.Split(info, ":")[1]
- } else if strings.Contains(info, ",") {
- host = strings.Split(info, ",")[0]
- port = strings.TrimSpace(strings.Split(info, ",")[1])
- } else if len(info) > 0 {
- host = info
- }
+ if strings.Contains(info, ":") {
+ host = strings.Split(info, ":")[0]
+ port = strings.Split(info, ":")[1]
+ } else if strings.Contains(info, ",") {
+ host = strings.Split(info, ",")[0]
+ port = strings.TrimSpace(strings.Split(info, ",")[1])
+ } else if len(info) > 0 {
+ host = info
+ }
return host, port
}