@@ -11,7 +11,7 @@ import (
11
11
12
12
"github.com/ttacon/builder"
13
13
14
- "github.com/ golang/protobuf/proto"
14
+ "google. golang.org /protobuf/proto"
15
15
)
16
16
17
17
const (
@@ -2560,7 +2560,7 @@ func maybeExtractCountryCode(
2560
2560
}
2561
2561
potentialCountryCode := extractCountryCode (fullNumber , nationalNumber )
2562
2562
if potentialCountryCode != 0 {
2563
- phoneNumber .CountryCode = proto .Int ( potentialCountryCode )
2563
+ phoneNumber .CountryCode = proto .Int32 ( int32 ( potentialCountryCode ) )
2564
2564
return potentialCountryCode , nil
2565
2565
}
2566
2566
@@ -2610,13 +2610,13 @@ func maybeExtractCountryCode(
2610
2610
val := PhoneNumber_FROM_NUMBER_WITHOUT_PLUS_SIGN
2611
2611
phoneNumber .CountryCodeSource = & val
2612
2612
}
2613
- phoneNumber .CountryCode = proto .Int ( defaultCountryCode )
2613
+ phoneNumber .CountryCode = proto .Int32 ( int32 ( defaultCountryCode ) )
2614
2614
return defaultCountryCode , nil
2615
2615
}
2616
2616
}
2617
2617
}
2618
2618
// No country calling code present.
2619
- phoneNumber .CountryCode = proto .Int (0 )
2619
+ phoneNumber .CountryCode = proto .Int32 (0 )
2620
2620
return 0 , nil
2621
2621
}
2622
2622
@@ -2867,7 +2867,7 @@ func setItalianLeadingZerosForPhoneNumber(
2867
2867
numLeadZeros ++
2868
2868
}
2869
2869
if numLeadZeros != 1 {
2870
- phoneNumber .NumberOfLeadingZeros = proto .Int ( numLeadZeros )
2870
+ phoneNumber .NumberOfLeadingZeros = proto .Int32 ( int32 ( numLeadZeros ) )
2871
2871
}
2872
2872
}
2873
2873
@@ -2958,7 +2958,7 @@ func parseHelper(
2958
2958
normalizedNationalNumber .WriteString (normalize (nationalNumber .String ()))
2959
2959
if len (defaultRegion ) != 0 {
2960
2960
countryCode = int (regionMetadata .GetCountryCode ())
2961
- phoneNumber .CountryCode = proto .Int ( countryCode )
2961
+ phoneNumber .CountryCode = proto .Int32 ( int32 ( countryCode ) )
2962
2962
} else if keepRawInput {
2963
2963
phoneNumber .CountryCodeSource = nil
2964
2964
}
@@ -3130,7 +3130,7 @@ func isNumberMatchWithNumbers(firstNumberIn, secondNumberIn *PhoneNumber) MatchT
3130
3130
// Checks cases where one or both country_code fields were not
3131
3131
// specified. To make equality checks easier, we first set the
3132
3132
// country_code fields to be equal.
3133
- firstNumber .CountryCode = proto .Int ( int ( secondNumberCountryCode ) )
3133
+ firstNumber .CountryCode = proto .Int32 ( secondNumberCountryCode )
3134
3134
// If all else was the same, then this is an NSN_MATCH.
3135
3135
// TODO(ttacon): remove when make gen-equals
3136
3136
if reflect .DeepEqual (firstNumber , secondNumber ) {
0 commit comments