mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-27 18:43:17 +01:00
2d1bf3982d
Co-authored-by: Zoltán Papp <zoltan.pmail@gmail.com>
22 lines
405 B
Go
22 lines
405 B
Go
// Deprecated: This package is deprecated and will be removed in a future release.
|
|
package address
|
|
|
|
import (
|
|
"bytes"
|
|
"encoding/gob"
|
|
"fmt"
|
|
)
|
|
|
|
type Address struct {
|
|
URL string
|
|
}
|
|
|
|
func (addr *Address) Marshal() ([]byte, error) {
|
|
var buf bytes.Buffer
|
|
enc := gob.NewEncoder(&buf)
|
|
if err := enc.Encode(addr); err != nil {
|
|
return nil, fmt.Errorf("encode Address: %w", err)
|
|
}
|
|
return buf.Bytes(), nil
|
|
}
|