File tree Expand file tree Collapse file tree 4 files changed +2
-1319
lines changed Expand file tree Collapse file tree 4 files changed +2
-1319
lines changed Original file line number Diff line number Diff line change 99)
1010
1111const CogletVersionEnvVarName = "R8_COGLET_VERSION"
12- const MonobaseMatrixHostVarName = "R8_MONOBASE_MATRIX_HOST"
13- const MonobaseMatrixSchemeVarName = "R8_MONOBASE_MATRIX_SCHEME"
1412
1513func envLineFromConfig (c * config.Config ) (string , error ) {
1614 vars := c .ParsedEnvironment ()
@@ -34,19 +32,3 @@ func CogletVersionFromEnvironment() string {
3432 }
3533 return host
3634}
37-
38- func MonobaseMatrixHostFromEnvironment () string {
39- host := os .Getenv (MonobaseMatrixHostVarName )
40- if host == "" {
41- host = "raw.githubusercontent.com"
42- }
43- return host
44- }
45-
46- func MonobaseMatrixSchemeFromEnvironment () string {
47- scheme := os .Getenv (MonobaseMatrixSchemeVarName )
48- if scheme == "" {
49- scheme = "https"
50- }
51- return scheme
52- }
Original file line number Diff line number Diff line change @@ -11,15 +11,3 @@ func TestCogletVersionFromEnvironment(t *testing.T) {
1111 t .Setenv (CogletVersionEnvVarName , cogletVersion )
1212 require .Equal (t , CogletVersionFromEnvironment (), cogletVersion )
1313}
14-
15- func TestMonobaseMatrixHostFromEnvironment (t * testing.T ) {
16- const monobaseMatrixHost = "localhost"
17- t .Setenv (MonobaseMatrixHostVarName , monobaseMatrixHost )
18- require .Equal (t , MonobaseMatrixHostFromEnvironment (), monobaseMatrixHost )
19- }
20-
21- func TestMonobaseMatrixSchemeFromEnvironment (t * testing.T ) {
22- const monobaseMatrixScheme = "http"
23- t .Setenv (MonobaseMatrixSchemeVarName , monobaseMatrixScheme )
24- require .Equal (t , MonobaseMatrixSchemeFromEnvironment (), monobaseMatrixScheme )
25- }
Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ type MonobaseMatrix struct {
2121}
2222
2323func NewMonobaseMatrix (client * http.Client ) (* MonobaseMatrix , error ) {
24- resp , err := client .Get (MonobaseMatrixSchemeFromEnvironment () + "://" + MonobaseMatrixHostFromEnvironment () + "/replicate/monobase/refs/heads/main/matrix.json" )
24+ url := "https://monobase-packages.replicate.delivery/matrix.json"
25+ resp , err := client .Get (url )
2526 if err != nil {
2627 return nil , err
2728 }
You can’t perform that action at this time.
0 commit comments