Skip to content

Instantly share code, notes, and snippets.

@zzerjae
Created October 31, 2020 08:16
Show Gist options
  • Save zzerjae/df54c9543fe1fc10f6857c8aca2a5d12 to your computer and use it in GitHub Desktop.
Save zzerjae/df54c9543fe1fc10f6857c8aca2a5d12 to your computer and use it in GitHub Desktop.
package worker
type mockRegionService struct{}
func (m *mockRegionService) GetRegionIdsByRange(_ int64, publishRange int) ([]int64, error) {
switch publishRange {
case 1:
return []int64{1234, 1235, 1236}, nil
case 2:
return []int64{1234, 1235, 1236, 1300, 1301, 1302}, nil
case 3:
return []int64{1234, 1235, 1236, 1300, 1301, 1302, 1400, 1401, 1402}, nil
case 4:
return []int64{1234, 1235, 1236, 1300, 1301, 1302, 1400, 1401, 1402, 1500, 1501, 1502}, nil
}
return nil, errors.New("not supported publishRange")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment