collection Library update 1.4.0 edition

collection The library has been in use , Weekend collection github Feedback on and contributor Modification of , Updated 1.4.0 edition .

This version does a few things :

Three types have been added , uint, uint32, uint64

These three types are also basic types , At present, basically all basic types have been covered , There are eleven types :

int32, int, int64, uint32, uint, uint64, float32, float64, string, object, objectPoint

increase Split and GroupBy Method

These two methods are actually a collection Grouping .Split According to the number , Divide the array into several parts , such as

intColl := NewIntCollection([]int{1, 2, 3, 4, 5, 6, 7, 8})
ret := intColl.Split(3) if len(ret) != 3 {
t.Fatal("split len not right")
} ret[0].DD()

according to size by 3 Divide into 3 Parts of

0: 1
1: 2
2: 3
0: 4
1: 5
2: 6
0: 7
1: 8

and GroupBy It is a requirement raised by colleagues when using , Classify a function as needed , Then the output , Be similar to spark Medium GroupBy operator

func TestInt32Collection_GroupBy(t *testing.T) {
objColl := NewInt32Collection([]int32{1, 1, 20, 4})
groupBy := objColl.GroupBy(func(item interface{}, i2 int) interface{} {
foo := item.(int32)
return foo
}) for k, collection := range groupBy {
} /*
=== RUN TestInt32Collection_GroupBy
/Users/yejianfeng/Documents/workspace/collection/int32_collection_test.go:97: 1
0: 1
1: 1
/Users/yejianfeng/Documents/workspace/collection/int32_collection_test.go:97: 20
0: 20
/Users/yejianfeng/Documents/workspace/collection/int32_collection_test.go:97: 4
0: 4

Actually, I did a few things :

1 Optimized some test cases , There are some direct dd Of , It feels ugly , Just take out

2 The document adds , Include readme And official documents

3 The official website has also been updated , . But it looks like github There is one action Mechanism , I haven't studied how to update github At the same time, update the... On your server vuepress.

The end , Have a nice weekend ~

collection Library update 1.4.0 More articles related to the version

  1. ios pod Update library to 1.0 or 1.0.1 Correct modification of podfile file

    See today cocopods All updated to 1.0.1 了 , When was it updated before 1.0 I didn't find out , Just updated , There were a lot of mistakes immediately . If there is no update , It is recommended not to update !!! Writing is troublesome ! Now record how to remove... Step by step ...

  2. ElasticSearch5.0+ Version word segmentation hot update practice record

    Preface First contact ElasticSearch When , The version is 2.3.4, A short time , Now it's all updated to 5.0+ Version of the . Participle and head It seems that the usage of plug-ins is different , This blog records how to configure Elasticsearch Of Hea ...

  3. vue+.netcore A development framework that supports business code expansion VOL.Vue 2.0 Version release

    The framework is introduced This is a base vue.element-ui.iview..netcore3.1 Can support the front end . Background dynamic extension business code rapid development framework . A custom developed code generator is built into the framework , The generated code does not need to be copied or changed , ...

  4. C# Language history version characteristics (C# 1.0 To C# 7.1 Summary update ) C# What's new in each version C# Version and .NET Version, and VS Version correspondence

    C# Language history version characteristics (C# 1.0 To C# 7.1 Summary update ) 2017 year 08 month 06 Japan 11:53:13 Read the number :6705 Version history C# As Microsoft 2000 Years later .NET The home language of platform development , So far, it has 1 ...

  5. Example : Customize WPF Underlying controls UI library HeBianGu.General.WpfControlLib V2.0 edition

    original text : Example : Customize WPF Underlying controls UI library HeBianGu.General.WpfControlLib V2.0 edition One . Purpose : Encapsulates some controls into a custom control library , Easy and fast development Two . Realization function : The basic implementation is often ...

  6. Wechat rapid development framework ( 6、 ... and )-- Wechat rapid development framework (WXPP QuickFramework)V2.0 Version Online -- The source code has been updated to github

    4 month 28 Japan , Multimedia upload and download has been added API, Corresponding MediaUploadRequest and MediaGetRequest ------------------------------------------ ...

  7. RDIFramework.NET Platform code generator V3.0 New version released - Updated on 20160518( Provide download )

    For the latest version, please go to :RDIFramework.NET Platform code generator V3.1 New version released - Updated on 2016-10-08( Provide download ) RDIFramework.NET Code generator V3.0 Revised for version 3.0 Version of ...

  8. nexus3.14.0 edition linux Environmental installation 、 start-up 、 Build a private bank

    This article introduces nexus3.14.0 Version in linux Installation in environment . start-up . Build a private bank . nexus3 The above version is too new , Installation details are rarely introduced online . It is understood that and 2.X The version is different . 1. Premise linux It needs to be installed on the machine first ...

  9. GitHub Study three - Remote repository update and submit

    1. Remote repository update Generally speaking , After associating local with remote , It's better to update the data from the remote and then upload it . Input git pull origin master If you want to create a new version library, check initialize include, ...

  10. go-wingui 2018 new v2.0 Version release , Contains major updates !

    go-wingui 2018 new v2.0 Version release , Contains major updates ! Use new version CEF kernel Chromium 63.0.3239.109, Pages can use the latest css3,html5 technology . Use delphi7 rewrite ...

Random recommendation

  1. Android The basic principle of custom control

    Preface : In everyday Android I often deal with controls in development , Sometimes Android The provided controls may not meet the needs of the business , At this time, we need to implement some custom controls , Today, let's have a general understanding of the requirements of custom controls and the basic principles of their implementation . since ...

  2. Reprint : There are two routers recently D-link , Tenda It is revealed that there is a back door in the firmware

    Recently, two routers were found to have backdoors in their firmware . D-link D-link It's a Taiwan company , Founded on 1986 year ,『 The company is committed to advanced networking . Broadband . Numbers . Design of voice and data communication solutions . Manufacturing and marketing , Is the global leader in the industry 』( Officer, ...

  3. To configure ini Appoint eclipse start-up JDK edition

    eclipse mars1 need JDK 1.7+ Solution : Change eclipse.ini The configuration file -startupplugins/org.eclipse.equinox.launcher_1.3.100 ...

  4. InnoDB Primary key design

    InnoDB yes clustered-index table, So for InnoDB for , Primary keys have special meaning . You can directly locate the physical location of a corresponding data row record through the primary key , The primary key index points to the corresponding row record , Other indexes point to the main ...

  5. JSON Format parsing and libjson Brief introduction ( About cjson Use example of )

    JSON Format parsing and libjson Brief introduction Before reading this article , Please read first <Rss Reader System design of case development > One article . Rss Reader In case development , Two kinds of data are mainly used in network data exchange ...

  6. AVAudioRecorder、AVAudioPlayer Recording and playing

    #pragma mark - Set the location of recorded audio files - (NSString *)audioRecordingPath{ NSString *str_date=[TimeTransform Date ...

  7. what XSS attack ?PHP prevent XSS Attack function

    what XSS attack ?PHP prevent XSS Attack function Release time : 2013-05-14 Browse times :22325 classification : PHP course XSS Its full name is Cross Site Scripting, The user intentionally or unintentionally enters... In the form ...

  8. Luogu P5284 [ The joint examination of 12 provinces 2019] String problem [ Suffix tree ]

    Portal Ideas set up \(dp_i\) Said to \(i\) At the end of the \(A\) strand , The longest length that can be reached . And then it turns out that obviously \(i\) To be under your control \(k\) Even the edge ,\(k\) To match \(j\) Even the edge , It's the longest way , Just build ...

  9. gradle Configuration unified management

    Configure global parameters root directory build.gradle file : Main concern ext part // Top-level build file where you can add configuration options ...

  10. Performance test : Environment deployment Redis Multi instance deployment

    because redis The server is implemented by single thread , Therefore, it can only occupy CPU The mononuclear , In order to make full use of CPU resources , You can start more than one server at the same time redis-server example Delete the previous first rdb.aof file Comment out 3 individual save ...