File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,10 @@ package main
22
33import (
44 "fmt"
5+ "net/http"
56
6- "github.com/ourstudio-se/puan-sdk-go/internal/gateway/glpk"
77 "github.com/ourstudio-se/puan-sdk-go/puan"
8+ "github.com/ourstudio-se/puan-sdk-go/solver"
89)
910
1011//nolint:gocyclo
@@ -57,7 +58,8 @@ func main() {
5758 }
5859
5960 // Create a solution creator with a solver client
60- solutionCreator := puan .NewSolutionCreator (glpk .NewDefaultClient ("http://127.0.0.1:9000" ))
61+ solverClient := solver .NewClient ("http://127.0.0.1:9000" , "1234567890" , & http.Client {})
62+ solutionCreator := puan .NewSolutionCreator (solverClient )
6163
6264 // Create the solution
6365 envelope , err := solutionCreator .Create (selections , ruleset , nil )
Original file line number Diff line number Diff line change @@ -2,10 +2,11 @@ package main
22
33import (
44 "fmt"
5+ "net/http"
56 "time"
67
7- "github.com/ourstudio-se/puan-sdk-go/internal/gateway/glpk"
88 "github.com/ourstudio-se/puan-sdk-go/puan"
9+ "github.com/ourstudio-se/puan-sdk-go/solver"
910)
1011
1112//nolint:gocyclo
@@ -48,7 +49,8 @@ func main() {
4849 panic (err )
4950 }
5051
51- solutionCreator := puan .NewSolutionCreator (glpk .NewDefaultClient ("http://127.0.0.1:9000" ))
52+ solverClient := solver .NewClient ("http://127.0.0.1:9000" , "1234567890" , & http.Client {})
53+ solutionCreator := puan .NewSolutionCreator (solverClient )
5254
5355 inSecondPeriod := endOfFirstPeriod .Add (5 * time .Minute )
5456 envelope , err := solutionCreator .Create (
You can’t perform that action at this time.
0 commit comments