@@ -11,7 +11,7 @@ import (
1111
1212 "github.com/ttacon/builder"
1313
14- "github.com/ golang/protobuf/proto"
14+ "google. golang.org /protobuf/proto"
1515)
1616
1717const (
@@ -2560,7 +2560,7 @@ func maybeExtractCountryCode(
25602560 }
25612561 potentialCountryCode := extractCountryCode (fullNumber , nationalNumber )
25622562 if potentialCountryCode != 0 {
2563- phoneNumber .CountryCode = proto .Int ( potentialCountryCode )
2563+ phoneNumber .CountryCode = proto .Int32 ( int32 ( potentialCountryCode ) )
25642564 return potentialCountryCode , nil
25652565 }
25662566
@@ -2610,13 +2610,13 @@ func maybeExtractCountryCode(
26102610 val := PhoneNumber_FROM_NUMBER_WITHOUT_PLUS_SIGN
26112611 phoneNumber .CountryCodeSource = & val
26122612 }
2613- phoneNumber .CountryCode = proto .Int ( defaultCountryCode )
2613+ phoneNumber .CountryCode = proto .Int32 ( int32 ( defaultCountryCode ) )
26142614 return defaultCountryCode , nil
26152615 }
26162616 }
26172617 }
26182618 // No country calling code present.
2619- phoneNumber .CountryCode = proto .Int (0 )
2619+ phoneNumber .CountryCode = proto .Int32 (0 )
26202620 return 0 , nil
26212621}
26222622
@@ -2867,7 +2867,7 @@ func setItalianLeadingZerosForPhoneNumber(
28672867 numLeadZeros ++
28682868 }
28692869 if numLeadZeros != 1 {
2870- phoneNumber .NumberOfLeadingZeros = proto .Int ( numLeadZeros )
2870+ phoneNumber .NumberOfLeadingZeros = proto .Int32 ( int32 ( numLeadZeros ) )
28712871 }
28722872}
28732873
@@ -2958,7 +2958,7 @@ func parseHelper(
29582958 normalizedNationalNumber .WriteString (normalize (nationalNumber .String ()))
29592959 if len (defaultRegion ) != 0 {
29602960 countryCode = int (regionMetadata .GetCountryCode ())
2961- phoneNumber .CountryCode = proto .Int ( countryCode )
2961+ phoneNumber .CountryCode = proto .Int32 ( int32 ( countryCode ) )
29622962 } else if keepRawInput {
29632963 phoneNumber .CountryCodeSource = nil
29642964 }
@@ -3130,7 +3130,7 @@ func isNumberMatchWithNumbers(firstNumberIn, secondNumberIn *PhoneNumber) MatchT
31303130 // Checks cases where one or both country_code fields were not
31313131 // specified. To make equality checks easier, we first set the
31323132 // country_code fields to be equal.
3133- firstNumber .CountryCode = proto .Int ( int ( secondNumberCountryCode ) )
3133+ firstNumber .CountryCode = proto .Int32 ( secondNumberCountryCode )
31343134 // If all else was the same, then this is an NSN_MATCH.
31353135 // TODO(ttacon): remove when make gen-equals
31363136 if reflect .DeepEqual (firstNumber , secondNumber ) {
0 commit comments