@@ -12,13 +12,8 @@ const (
1212 // It MUST not be changed, otherwise existing nodes will not be recognized anymore.
1313 prefixCloud = "hcloud://"
1414
15- // prefixRobot is the prefix for Robot Server provider IDs.
16- //
17- // It MUST not be changed, otherwise existing nodes will not be recognized anymore.
18- prefixRobot = "hrobot://"
19-
20- // prefixRobot is the prefix used by the Syself Fork for Robot Server provider IDs.
21- // This Prefix is no longer used for new nodes, instead [prefixRobot] should be used.
15+ // prefixRobotLegacy is the prefix used by the Syself Fork for Robot Server provider IDs.
16+ // This Prefix is no longer used for new nodes, instead prefix "hrobot://" should be used.
2217 //
2318 // It MUST not be changed, otherwise existing nodes will not be recognized anymore.
2419 prefixRobotLegacy = "hcloud://bm-"
@@ -30,9 +25,8 @@ type UnkownPrefixError struct {
3025
3126func (e * UnkownPrefixError ) Error () string {
3227 return fmt .Sprintf (
33- "Provider ID does not have one of the the expected prefixes (%s, %s, %s ): %s" ,
28+ "Provider ID does not have one of the the expected prefixes (%s, %s): %s" ,
3429 prefixCloud ,
35- prefixRobot ,
3630 prefixRobotLegacy ,
3731 e .ProviderID ,
3832 )
@@ -46,9 +40,6 @@ func (e *UnkownPrefixError) Error() string {
4640func ToServerID (providerID string ) (id int64 , isCloudServer bool , err error ) {
4741 idString := ""
4842 switch {
49- case strings .HasPrefix (providerID , prefixRobot ):
50- idString = strings .ReplaceAll (providerID , prefixRobot , "" )
51-
5243 case strings .HasPrefix (providerID , prefixRobotLegacy ):
5344 // This case needs to be before [prefixCloud], as [prefixCloud] is a superset of [prefixRobotLegacy]
5445 idString = strings .ReplaceAll (providerID , prefixRobotLegacy , "" )
0 commit comments