@@ -266,11 +266,9 @@ func _main() error {
266266 // -E, like "cc -E"
267267 flagAction ("E" , actionDump , nil , "just dump the assembled source, without running it." )
268268 flagAction ("Eplay" , actionDumpPlay , nil , "just dump the assembled source for posting on https://go.dev/play" )
269- // TODO allow to optionally set a different endpoint
270- flagAction ("play" , actionPlay , nil , "run the code remotely on https://go.dev/play" )
271- flagAction ("share" , actionShare , nil , "share the code on https://go.dev/play and print the URL." )
272269
273- // TODO allow to optionally set a different endpoint for the Go Playground
270+ // -play, -share
271+ registerOnlineFlags ()
274272
275273 flag .Func ("o" , "just build a binary, don't execute." , func (value string ) (err error ) {
276274 if action != actionDefault {
@@ -491,11 +489,11 @@ func _main() error {
491489 }
492490 case actionPlay :
493491 var cleanup func ()
494- srcFinal , tail , cleanup = prepareSub ( playClient )
492+ srcFinal , tail , cleanup = prepareSubPlay ( )
495493 defer cleanup ()
496494 case actionShare :
497495 var cleanup func ()
498- srcFinal , tail , cleanup = prepareSub ( shareClient )
496+ srcFinal , tail , cleanup = prepareSubShare ( )
499497 defer cleanup ()
500498 default : // actionDump, actionDumpPlay
501499 srcFinal = os .Stdout
0 commit comments