always use amarula ad
This commit is contained in:
@@ -3,7 +3,6 @@ package webcontroller
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"math/rand"
|
|
||||||
"mime"
|
"mime"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
@@ -33,14 +32,14 @@ func adType() (i int) {
|
|||||||
// Intn returns a number up to n, but never n itself. So it get a random 0
|
// Intn returns a number up to n, but never n itself. So it get a random 0
|
||||||
// or 1 we need to give it n=2. We can use this function to make other
|
// or 1 we need to give it n=2. We can use this function to make other
|
||||||
// splits like 1/3 1/4, etc
|
// splits like 1/3 1/4, etc
|
||||||
i = rand.Intn(2)
|
// i = rand.Intn(2)
|
||||||
|
|
||||||
switch {
|
// switch {
|
||||||
case i == 1: // 50% of the traffic
|
// case i == 1: // 50% of the traffic
|
||||||
return 1 // Amarula
|
return 1 // Amarula
|
||||||
default:
|
// default:
|
||||||
return 0 // A-Ads
|
// return 0 // A-Ads
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
type viewerData struct {
|
type viewerData struct {
|
||||||
|
Reference in New Issue
Block a user