github.com/gogf/gf@v1.16.9/net/ghttp/ghttp_unit_init_test.go (about) 1 // Copyright GoFrame Author(https://goframe.org). All Rights Reserved. 2 // 3 // This Source Code Form is subject to the terms of the MIT License. 4 // If a copy of the MIT was not distributed with this file, 5 // You can obtain one at https://github.com/gogf/gf. 6 7 package ghttp_test 8 9 import ( 10 "github.com/gogf/gf/container/garray" 11 "github.com/gogf/gf/os/genv" 12 ) 13 14 var ( 15 ports = garray.NewIntArray(true) 16 ) 17 18 func init() { 19 genv.Set("UNDER_TEST", "1") 20 for i := 7000; i <= 8000; i++ { 21 ports.Append(i) 22 } 23 }